Commit a Transaction in Activiti JAVA Delegate Service task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2020 04:46 PM
I am working on solution for
1) calling a new Child Process fromn within a Service task of Parent Process.
2) submiting the task form of Child process from same Service task of Parent Process.
Problem i am facing is Child process is not getting commited in database but process instance id is generated in-memory. Therefore, while submiting the task form of child process, error is thrown saying "could not find process with id xxxx".
Is there a way to manually/forcefully commit the transaction and can be implemented inside the code logic of javadelegate service task?
So the code will look like :
public class ExecuteBusinessProcessDelegate implements JavaDelegate{ protected Expression processdeploymentid;//Required field @Override public void execute(DelegateExecution execution) throws Exception { String deploymentid = expConvUtility.getExpressionAsString(processdeploymentid, execution); RuntimeService runtimeService = execution.getEngineServices().getRuntimeService(); ProcessInstance processInstance = runtimeService.startProcessInstanceById(processDefinitionId,variables); /// Commit the transaction here >>>>> /// Submit the task ID here } }
- Labels:
-
Alfresco Process Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2020 06:52 AM
As a customer, have you raised a ticket for this issue?
Cheers,
Problem solved? Click Accept as Solution!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2020 03:32 AM
Yes. My motive to post this query here was to get help from some community member if anyboday has already faced such issue. Thanks.
