01-14-2015 09:59 PM
08-16-2016 07:35 PM
08-17-2016 10:47 AM
receivetask0
activity into process diagram. (because we had no wait state which can accept signal there. The simplification can be replaced by new FlowNodeActivityBehavior
which will accept signals on the service tasks and start tasks too.12-20-2018 04:05 AM
Thanks martin for nice, easy to understand code.
I am trying to do same thing(Restarting a process from specified step in flow).
I have converted above code for Activiti 6?
public class RestartInstanceActivitiCommand implements Command<Void> {
private final String executionId;
private final FlowElement flowElement;
public RestartInstanceActivitiCommand(String executionId, FlowElement flowElement) {
this.executionId = executionId;
this.flowElement = flowElement;
}
public Void execute(CommandContext commandContext) {
ExecutionEntity execution = commandContext.getExecutionEntityManager().findById(this.executionId);
execution.setCurrentFlowElement(flowElement);
return null;
}
}
Triggered it with :
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) processEngine
.getProcessEngineConfiguration();
CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutor();
BpmnModel bpmnModel = repositoryService.getBpmnModel("activitiPoc:2:5004");
FlowElement flowElement = bpmnModel.getFlowElement("filterData");
commandExecutor.execute(new RestartInstanceActivitiCommand(processInstanceId, flowElement));
runtimeService.trigger(processInstanceId);
The process is going to the desired state, but it is getting stuck at that step itself.
Tried to restart the process with :
servce task : The process execution moves to service task, but It's not getting called automatically as it would normally.
User Task : The process instance is not getting assigned to the mentioned user mentioned in the userTask. Just cursor moves to user task.
Also I did not find any code sample forFlowNodeActivityBehavior.
Really appreciate help on this!
08-17-2016 01:10 PM
08-18-2017 07:29 AM
Hey, did you figure out how to do this using FlowNodeActivityBehavior?
11-07-2016 09:26 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.