Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1200628 - Add taskService.addContent() for Remote API
Add taskService.addContent() for Remote API
Status: VERIFIED
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central (Show other bugs)
6.0.3
Unspecified Unspecified
medium Severity medium
: ER1
: 6.2.0
Assigned To: Shelly McGowan
Lukáš Petrovický
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-10 22:58 EDT by Toshiya Kobayashi
Modified: 2018-01-30 23:40 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Feature Request
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Toshiya Kobayashi 2015-03-10 22:58:58 EDT
Description of problem:

Please add addContent(long taskId, Map<String, Object> params) method to Remote API taskService.


Steps to Reproduce:

RemoteRuntimeEngine engine = restSessionFactory.newRuntimeEngine();
TaskService taskService = engine.getTaskService();
Map<String, Object> params = new HashMap<String, Object>();
params.put("param1", "01");
((InternalTaskService)taskService).addContent(taskId, params);

Actual results:

java.lang.UnsupportedOperationException: The .addContent(..) method is not supported on the remote api.
	at org.kie.services.client.api.command.AbstractRemoteCommandObject.execute(AbstractRemoteCommandObject.java:103)
	at org.jbpm.services.task.impl.command.CommandBasedTaskService.addContent(CommandBasedTaskService.java:547)
	at com.sample.SimpleRestTest.testRest(SimpleRestTest.java:63)

Expected results:

Executed without Exception.
Comment 1 Toshiya Kobayashi 2015-03-11 02:04:17 EDT
This BZ request is

- long addContent(long taskId, Map<String, Object> params);

but

- long addContent(long taskId, Content content);

is also good to have (not mandatory for this BZ.).
Comment 2 Marco Rietveld 2015-08-04 07:25:58 EDT
Fixed. Commits: 

6.3.x: 
https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/ff4e1b20
https://github.com/droolsjbpm/droolsjbpm-integration/commit/6790e8ef
https://github.com/droolsjbpm/jbpm/commit/b6949dfd

These commits are also available on master (6.4): see the chery-pick links in the above github links.
Comment 3 Marco Rietveld 2015-08-04 07:26:08 EDT
Toshiya, 

I've only added the following operations: 

 RemoteApiResponse<Long> resp = remoteTaskService.addOutputContent(taskId, contentMap);
 RemoteApiResponse<Map<String, Object>> mapResp = remoteTaskService.getOutputContentMap(taskId);

See 

https://github.com/droolsjbpm/droolsjbpm-integration/blob/6.3.x/kie-remote/kie-remote-client/src/main/java/org/kie/remote/client/api/RemoteTaskService.java#L43-L45

You can find an example of how to use these operations here: 

https://github.com/droolsjbpm/kie-tests/blob/26a001e199149dab41e86cc3580b8a3143896910/remote-kie-tests/kie-wb-tests/kie-wb-tests-base/src/main/java/org/kie/tests/wb/base/methods/KieWbRestIntegrationTestMethods.java#L1261-L1293

I'm discussing how to best add a "pure" addContent method (something like addcontent(long taskId, Object content) or addContent(long taskId, Serializable object)) with Maciej and Kris. I hope to add it soon (but not for product 6.2, unfortunately).
Comment 4 Toshiya Kobayashi 2015-08-04 20:59:14 EDT
addOutputContent() looks good for the BZ's expectation.

Thanks Marco!
Comment 5 Tomas Livora 2015-10-01 04:40:45 EDT
Verified on BPMS 6.2.0 ER3

Note You need to log in before you can comment on or make changes to this bug.