cancel
Showing results for 
Search instead for 
Did you mean: 

External form rendering using activiti:formKey - Need Input

sankarts
Champ in-the-making
Champ in-the-making
Hello,

My objective is to deploy and start workflow instance
I could deploy and start workflow instance programmatically. My Workflow spec (*.bpmn20.xml) includes User Tasks and Service Tasks.
I would like to complete workflow execution programmatically i.e. completing tasks (User Tasks with external forms and service / script tasks) and communicate data between tasks.
Activiti-Explorer is not in the picture at all.

For User Tasks, I am trying to render external HTML forms. For the same, activiti:formKey="test.html" for this User Task.

For example, one of the User Tasks is associated with test.html

<userTask id="myUserTask" name="My Sample User Task" activiti:formKey="test.html">


Then the task id for this UserTask has been determined (say 7)


ProcessEngine processEngine = ProcessEngineConfiguration
               .createStandaloneInMemProcessEngineConfiguration()
               .buildProcessEngine();
TaskFormData taskFormData = processEngine.getFormService().getTaskFormData("7");
TaskService taskService = processEngine.getTaskService();
taskService.complete("7");


My Queries
1) How to render "test.html", when the UserTask "myUserTask" is initiated? Any sample code snippet would be of help.

2) How to pass the data user inputted from test.html (external form) into the subsequent service task as "process variables".
6 REPLIES 6

sankarts
Champ in-the-making
Champ in-the-making
Any inputs on this would be of great of help. Thanks in advance.

julio_sampaio
Champ in-the-making
Champ in-the-making
Did you get this working?

Regards,

saliaz
Champ in-the-making
Champ in-the-making
@sankarts
Did you manage to get this working? i am also looking to achieve the same as i do not want to use activiti-explorer at all and want to use external forms for user input etc.

I am newbie to activiti on v5.19 and recently started working with it.

Would be great to see some example as documentation is not much helpful with regards to the external forms and Web apps.

Thanks
sal

narranil2
Champ in-the-making
Champ in-the-making
Do you guys managed to call external form using formkey in Activiti enterprise?Please post the snippet of the code if you have any?

Thanks,
Anil

mohitjain86
Champ in-the-making
Champ in-the-making

Can some reply to this? On activiti 6 how exactly the form key should be configured to render the form? 

ryandawson
Elite Collaborator
Elite Collaborator

Perhaps this link answers the key question - How to render external form in Activiti human task? - Stack Overflow . It has a link to an example but you could also look at activiti-examples/engine/src/main/process/org/activiti/examples/taskforms at master · ilgrosso/activ... 

See also Is activiti:formKey really necessary? 

If you're using the activiti UI for v6 or enterprise then I'd expect built-in form rendering to be of more interest. See Activiti 6 UI - built-in form rendering