AnsweredAssumed Answered

Create a ScriptTaskListener through the Web designer UI without XML

Question asked by jfratekronos on Aug 16, 2016
Latest reply on Aug 16, 2016 by jfratekronos
Hello,

I am attempting to add a "ScriptTaskListener" through the Activiti Designer web front-end, and cannot set the fields correctly.  I need to do this via the front-end web designer, without direct access to the XML.

I create a new process and add the following steps from teh Alfresco Activiti Designer WEB UI:

1. Drag-and-drop a "Start Event" from "Start Events"
2. Drag-and-drop a "User task" from "Activities", and connect from the "Start Event"
3. Drag-and-drop an "End event" from "End Events", and connect from the "User task"
4. For the "User task", I fill in the following property fields:
- ID: "UserTaskID"
- Name: "UserTaskName"
- Assignment: "Assign to process initiator" (and I check "allow process initiator to complete task")
- Task listeners: "ScritpTaskListener" (SEE BELOW)

I set no other properties.  For the "Task listeners", I want to add a "ScriptTaskListener".  I add the following properties:
- Event: "create" (from the dropdown)
- Class: "org.activiti.engine.impl.bpmn.listener.ScriptTaskListener"

From here, I am unsure what to add for the remaining fields, including "Expression", "Delegate expresson", and field values.  What do I add to these fields (via the front-end UI) to make this script listener work?  Any example would be OK for me, I just want to get a script listener working.

Thank you!

Outcomes