0

I want to render external form as part of my user task in wso2 BPMN. However, I ma not sure whether I am using the formKey properly. I configured the user task as follows and it was not rendering the form

**<userTask id="usertask1" name="User Task" activiti:assignee="admin" activiti:formKey="conf/user.html"></userTask>**

Hence, I have the following queries

  1. Should formKey be a simple file path or it should be a key?
  2. If it should be a key, how to generate the key? Should the form be registered to obtain the key? (If so, how?)

Main Config image for User Task in WSO2

Naveen S
  • 1
  • 3

1 Answers1

0

You are using the form key correctly, however, be aware the form key is nothing more metadata. You will need to create a client application that understands what to do with the form key. The Activiti 6 Tasklist application is a perfect example of how an application makes use of the form key.

I also wrote a simple example for Activiti 5.14 that may help here, it uses Alpaca form renderer and form keys but the ReST APi I used was removed in 5.16 so I halted development: https://github.com/gdharley/activiti-alpaca

Greg Harley
  • 3,230
  • 1
  • 11
  • 14
  • Thanks. But how exactly to link my custom implementation to the user task created in BPMN? Coz the assignee and other flow details are as part of the user task created. Attached the screenshot of my editor where there is no option to add implementation class or anything. Am I missing something? – Naveen S May 07 '18 at 06:10
  • Your custom application will use the ReST (or Java) API to retrieve the task details which will include the form key. Once you have toe form key, you render or redirect. – Greg Harley May 07 '18 at 19:38
  • But the workflow would have already assigned the task to the user in that case. So can we be able to edit the already assigned task? In wso2, when the workflow gets triggered, the ask gets created and assigned to the assignee, in that case. how exactly to bring in the custom form into play? – Naveen S May 08 '18 at 05:22
  • Yes, when you submit the form you will need to complete the task (there is a ReST API for this) and at the same time update variables from the form submission. – Greg Harley May 09 '18 at 14:05