main process

  | <?xml version="1.0" encoding="UTF-8"?>
  | <process name="wf_ingest_book" version="1" xmlns="http://jbpm.org/4.2/jpdl";>
  |    <start g="264,19,48,48" name="startIngestBook">
  |       <transition g="-73,-18" name="trDecideType" to="decideType"/>
  |    </start>
  |    <decision g="271,125,48,48" name="decideType">
  |      <handler class="org.sae.services.jbpm4.DecideTypeHandler" />
  |       <transition g="-95,-18" name="trMetaOnlyIngest" to="metaonly-ingest"/>
  |       <transition g="499,235:-48,-18" name="trFailed" to="failed"/>
  |    </decision>
  |     <sub-process name="metaonly-ingest" 
sub-process-key="wf_metaonly_ingestion"
  |         g="130,367,132,53">
  |       <transition name="trSuccess" to="succeeded" g="-62,-18"/>
  |       <transition name="trFailed" to="failed" g="-62,-18"/>
  |    </sub-process>  
  |    <end g="122,443,48,48" name="succeeded"/>
  |    <end-error g="387,459,48,48" name="failed"/>
  | </process>
  | 

SupProcess

  | <?xml version="1.0" encoding="UTF-8"?>
  | <process name="wf_metaonly_ingestion" version="1" 
xmlns="http://jbpm.org/4.2/jpdl";>
  |     <start g="333,26,48,48" name="startMetaOnlyIngestion">
  |             <transition g="-113,-22" name="trMetaOnlyIngest" 
to="stateMetaOnlyIngest"/>
  |     </start>
  |     <custom g="275,201,163,52" 
  |             name="stateMetaOnlyIngest" 
  |             class="org.sae.services.jbpm4.IngestBookActivity">
  |             <transition g="234,231:-42,-18" name="trSuccess" 
to="succeeded"/>
  |             <transition g="494,231:-48,-18" name="trFailure" to="failed"/>
  |     </custom>
  |     <end g="209,356,48,48" name="succeeded"/>
  |     <end-error g="471,367,48,48" name="failed"/>
  | </process>
  | 

JBPMTestCase

  | public void testDoDirty() {
  |             ProcesssInformationService pisrv = JBPMServices
  |                             .getProcesssInformationService();
  |             System.out.println("TEST");
  |             // ProcessInstance processInstance =
  |             // pisrv.startProcess("wf_ingest_book");
  |             String pid = "wf_ingest_book";
  |             String cid = System.currentTimeMillis() + "";
  |             Map<String,Object>  variables = new HashMap<String,Object>();
  |             variables.put("product-type","book");
  |             variables.put("ingest-type","meta-only");
  |             variables.put("prod-cd", "AE-21");
  |             variables.put("c-id", "");//Some CID Number 
  |             ProcessInstance processInstance = 
pisrv.startProcess(pid,variables, cid);
  | 

i can access all these variables in my main process - any event,lisenter,java 
module hooks.

but these same variables are not able to my sub-process custom module.

i tried to get parent.getProcessInstance.getVariable also.. parent is comming 
as null..



  | ublic class IngestBookActivity implements ExternalActivityBehaviour  {
  |     public void signal(ActivityExecution execution, String signalName,
  |                     Map<String, ?> parameters) throws Exception {
  |             
  |             System.out.println( " Parameters "+parameters);
  |             String prodCd = (String)execution.getVariable("prod-cd");
  |             String prodType = (String)execution.getVariable("product-type");
  | /** both prod-cd, prod-type comming as null */
  |             IngestionControl pojo = new IngestionControl();
  |             pojo.setProdCd(prodCd);
  |             pojo.setProdType(prodType);
  |             
  |             String executionPath = "trSuccess";
  |             try {
  |                     doIngestion(pojo);
  |                     System.out.println(" IngestBook Activity --- Book 
Ingested Successfully ");
  |             } catch (Exception e) {
  |                     e.printStackTrace();
  |                     executionPath = "trFailure";
  |             }
  |             execution.take( executionPath);
  |     }
  | 

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4270008
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to