1 Reply Latest reply on Jul 23, 2014 6:52 PM by Jose Miguel Loor

    remotely save content to a task

    Jose Miguel Loor Apprentice

      Hi

      I would like to remotely save content to a task, but there is no such method in the rest API

      Is there any way to do this ??

      In the business-process console, a user can save content to a task, but there is no methos for this in the rest API ? how is it done ??

        • 1. Re: remotely save content to a task
          Jose Miguel Loor Apprentice

          I had to implement my own rest api for this

          I create and endpoint and internally do something like this:

           

          KieServices kServices = KieServices.Factory.get();

          ReleaseId releaseId = kServices.newReleaseId(groupId, artifact, version);

          RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder(releaseId).entityManagerFactory(emf).get();

          TaskServiceFactory taskServiceFactory = new LocalTaskServiceFactory(environment);

          InternalTaskService taskService = (InternalTaskService) taskServiceFactory.newTaskService();

           

          after that i am able to interact with the task internally (get tasks, add content, etc)