cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to deploy and execute the unix shell script

mohitsrivastava
Champ in-the-making
Champ in-the-making
Hi,

My requirement:
To execute the shell script from Activiti.

I did the following:

1. Created bpmn from eclipse.

Part of xml from bpmn file.

<process id="activitiReview" name="Review And Approve Activiti Process" isExecutable="true">
    <startEvent id="start" activiti:formKey="wf:submitReviewTask"></startEvent>
    <serviceTask id="servicetask1" activiti:type="shell">
   <extensionElements>
          <activiti:field name="directory" stringValue="/usr" />
   </extensionElements>
    </serviceTask>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow1" sourceRef="servicetask1" targetRef="endevent1"></sequenceFlow>
  </process>


2. Imported it in Activiti Explorer.
3. Delpoy it.
During deploy getting the following error.

03:29:54,782 [http-apr-8080-exec-6] ERROR org.activiti.editor.ui.EditorProcessDefinitionDetailPanel  - Failed to deploy model
org.activiti.engine.ActivitiException: Errors while parsing:
[Validation set: 'activiti-executable-process' | Problem: 'activiti-servicetask-missing-implementation'] :
One of the attributes 'class', 'delegateExpression', 'type', 'operation', or 'expression' is mandatory on serviceTask. -
[Extra info : processDefinitionId = activitiReview | processDefinitionName = Review And Approve Activiti Process | 
| id = servicetask1 | ] ( line: 5, column: 36)


It will be highly helpful for me if you could please suggest that what are the correct steps to execute a shell script through Activiti as soon as possible.

Thanks
Mohit
3 REPLIES 3

mohitsrivastava
Champ in-the-making
Champ in-the-making
Hi,

Could you please reply on this.
It is really very urgent as I have to give solution to the client.

OR at least please let me know is it possible to execute the unix shell script from Activiti or not.

Thanks
Mohit

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Mohit,

Have a look on the following example:
org.activiti.examples.bpmn.shell.ShellTaskTest#testEchoShellWindows

Regards
Martin

jbarrez
Star Contributor
Star Contributor
"It is really very urgent as I have to give solution to the client."

This is a forum for an open source framework. If you need SLA's, the forum is not the place to be.