Just trying to deploy a process

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2011 12:31 AM
public String deploySomething(String resName, String xml) throws Exception { DeploymentBuilder db = m_procEngine.getRepositoryService().createDeployment().name("Poo"); db.addString(resName, xml); Deployment dep = db.deploy(); String id = dep.getId(); Thread.sleep(5000); System.out.println("Proc Defs "+m_procEngine.getRepositoryService() .createProcessDefinitionQuery().count()); return (id); }
The count from the process definition query is always 0.
Here is what the xml parameter contains:
<definitions id="test_definitions" targetNamespace="http://activiti.org/bpmn20" xmlns:activiti="http://activiti.org/bpmn" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"> <process id="translation" name="Single phase translation"> <startEvent id="start"/> <sequenceFlow id="flow1" sourceRef="start" targetRef="doTranslate" /> <serviceTask id="doTranslate" name="Translate" activiti:class="TranslationTask"/> <sequenceFlow id="flow2" sourceRef="doTranslate" targetRef="end" /> <endEvent id="end" /> </process> </definitions>
Although it doesn't seem to matter what I pass to addString. I can pass badly formed xml and it still seems to go through almost as if it isn't even trying to parse the data.
What am I doing wrong?
Labels:
- Labels:
-
Archive
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2011 05:48 AM
Hi,
Which resource name are you using? It should end with .bpmn20.xml to be picked up by the Activiti Engine process definition parser.
Best regards,
Which resource name are you using? It should end with .bpmn20.xml to be picked up by the Activiti Engine process definition parser.
Best regards,

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2011 09:21 AM
That was it, thanks.
This really needs to be more clear in the documentation. Especially in the javadoc comments for the methods.
Brian
This really needs to be more clear in the documentation. Especially in the javadoc comments for the methods.
Brian

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2014 04:45 AM
I ran into same scenario. documentation is missing which should have probably stated that any resource string literal should end with with ".bpmn20.xml".
Anyhow, This thread was resourceful. Thanks a lot.
Anyhow, This thread was resourceful. Thanks a lot.
