[jboss-user] [jBPM Users] - How does one create new instance with process variables thro

schechtere do-not-reply at jboss.com
Mon Nov 23 12:49:33 EST 2009


I'm trying to use Rest interface to create new instance.  It's working, but Its not assigning process variables  to the new instance.

Here's the URL to view an instance created through the console (rather than through a direct Rest call), and the data it returns:

http://localhost:8080/gwt-console-server/rs/process/instance/VacationRequest.10023/dataset


{dataset ref="VacationRequest.10023"}
{data key="Done" javaType="java.lang.String"}
{value xsi:type="xs:string">Submit</value}
{/data}
{data key="number_of_days" javaType="java.lang.String"}
{value xsi:type="xs:string"}5{/value}
{/data}
{data key="employee_name" javaType="java.lang.String"}
{value xsi:type="xs:string"}Hank{/value}
{/data}
{/dataset}

And here's the entire HTML member I'm using to create a new process:

{form method='post' enctype="multipart/form-data"  action="http://localhost:8080/gwt-console-server/rs/process/definition/VacationRequest-1/new_instance"}

{p}Days: {input type="text" name='number_of_days' id='number_of_days' /}
{p}Name: {input type="text" name='employee_name' id='employee_name' /}
{p}

{/form}


When I submit this form, with values entered, I am redirected to 

http://localhost:8080/gwt-console-server/rs/process/definition/VacationRequest-1/new_instance

And see data:

{
  "id": "VacationRequest.90046",
  "definitionId": "VacationRequest-1",
  "startDate": "2009-11-23 11:24:13",
  "suspended": false,
  "rootToken": {
    "id": "VacationRequest.90046",
    "currentNodeName": "verify_request",
    "children": [],
    "availableSignals": [],
    "canBeSignaled": true
  }
} 

Finally, when I look at the new instance using

http://localhost:8080/gwt-console-server/rs/process/instance/VacationRequest.90046/dataset

I see

{dataset ref="VacationRequest.90046"/}


Any insights on why I'm not seeing the number_of_days and employee_name process variables?

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267099#4267099

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267099



More information about the jboss-user mailing list