cancel
Showing results for 
Search instead for 
Did you mean: 

Ad Hoc Workflow

tschiela
Champ in-the-making
Champ in-the-making
Hello,

is it possible to define a process by code? I need it becouse the users should define some simple Ad-Hoc Workflows … e.g. assign task and simple gateways … like in Activiti Kickstart

Greets
Thomas
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
Currently, processes definitions are obtained by consulting some kind of read-through cache of parsed process-definitions. When a process-definition is requested and not in cache, it's deployment is looked up (based in data stored when process was deployed the first time) and the process-resouce is parsed by the BpmnParser to an internal model used by activiti.

There is no pluggable way of bypassing this mechanism, so if you want to hook in your code, that returns the ad-hoc ProcessDefinition (activiti-format) generated, you'll have to edit the activiti source-code an build it from there. Another option is to generate BPMN 2.0 xml and deploy this to the engine using the API. This approach can be used with activiti out of the box. Since you're only talking about "simple" worklfows, It's not that hard to generate those XML's. Look at kickstart, it uses JAXB for creating the XML…

bernd_ruecker
Champ in-the-making
Champ in-the-making
You might use the Eclipse Ecore model as well to build BPMN 2.0 XML, by doing so you have an easy Java API, see https://app.camunda.com/confluence/display/foxUserGuide/Java+API+to+read+and+write+BPMN+2.0+XML+Intr.... Send me an email then I can export this enterprise only content as PDF and send it over…

Cheers
Bernd