Kaleo workflow: API to choose a transition from an initial state

thumbnail
Enrico Oliosi, modified 7 Years ago. Junior Member Posts: 73 Join Date: 7/6/10 Recent Posts

Hi all, in attached file there is a simple image which describes my workflow. A user compiles a form and then he has two possibilites: save it as draft or submit it for approving. 

 

When a user presses one of two buttons I start workflow by WorkflowHandlerRegistryUtil.startWorkflowInstance API and then I would like to execute one of the

two transition: Submission or Draft.  

I know that for task we can use WorkflowTaskManagerUtil.completeWorkflowTask where transitionName is an input parameter, but I have a state here and I cannot find

an API for the state that helps me to execute a transition. 

 

I am using Liferay 7.0 GA6 (CE)

 

Any idea? Do I wrong workflow definition maybe?

 

Thanks.

 

Enrico

Attachments:

thumbnail
Ketan Savaliya, modified 7 Years ago. Regular Member Posts: 117 Join Date: 3/3/11 Recent Posts

Hi Enrico,

 

In this case you start your workflow initiate only in the case submit happen.  Don't initiate workflow in Draft save.

Then after all execution will take care by work flow.

thumbnail
Enrico Oliosi, modified 7 Years ago. Junior Member Posts: 73 Join Date: 7/6/10 Recent Posts

Hi Ketan, so you suggest to start workflow after submission only. When an user chooses the draft option the workflow hasn't to start.