0

ここから単純な作業項目を実行しようとしています:http://docs.jboss.org/jbpm/v5.4/userguide/ch.domain-specific-processes.html#d0e7389

私のコード:

.wid ファイル

import org.drools.process.core.datatype.impl.type.StringDataType;
[
  // the Notification work item
  [
    "name" : "Notification",
    "parameters" : [
      "Message" : new StringDataType(),
      "From" : new StringDataType(),
      "To" : new StringDataType(),
      "Priority" : new StringDataType(),
    ],
    "displayName" : "Notification",
    "icon" : "icons/notification.gif"
  ]
]

次に、単純な作業項目ハンドラーを実装して登録しました

@Override
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
    String from = (String) workItem.getParameter("From");
    System.out.println("from " + from);
}

私のカスタムノードはEclipseモデラーに自動的に表示されたので、簡単なプロセスを作成しました:
開始>ノード>終了
し、「From」パラメーターの値を設定しましたが、実行すると次のようになります:

ERROR ExtensibleXmlParser:666 - (null: 24, 31): cvc-complex-type.2.4.b: The content of element 'bpmn2:ioSpecification' is not complete. One of '{"http://www.omg.org/spec/BPMN/20100524/MODEL":inputSet, "http://www.omg.org/spec/BPMN/20100524/MODEL":outputSet}' is expected.

「from null」も出力されます

bpmn ファイルには ioSpecification が 1 つだけ含まれており、inputSet ノードがあります。

  <bpmn2:ioSpecification id="_InputOutputSpecification_12">
    <bpmn2:dataInput id="_DataInput_15" name="Message"/>
    <bpmn2:dataInput id="_DataInput_16" itemSubjectRef="ItemDefinition_4" name="From"/>
    <bpmn2:dataInput id="_DataInput_17" name="To"/>
    <bpmn2:dataInput id="_DataInput_18" name="Priority"/>
    <bpmn2:inputSet id="_InputSet_12" name="Input Set 12">
      <bpmn2:dataInputRefs>_DataInput_15</bpmn2:dataInputRefs>
      <bpmn2:dataInputRefs>_DataInput_16</bpmn2:dataInputRefs>
      <bpmn2:dataInputRefs>_DataInput_17</bpmn2:dataInputRefs>
      <bpmn2:dataInputRefs>_DataInput_18</bpmn2:dataInputRefs>
    </bpmn2:inputSet>
  </bpmn2:ioSpecification>

jbpm 5.4.final
Eclipse BPMN2 Editor 0.2.5.201305082126
eclipse JBoss jBPM5 Runtime Extension Feature 0.2.5.201305082126
eclipse JBoss jBPM Core 5.5.0.Final
Eclipse JBoss jBPM Task 5.5.0.Finalを使用しています。

4

1 に答える 1

1

ioSpecification は常に outputSet (XSD で定義されている) を必要としますが、これは空である可能性があります。

于 2013-05-23T18:48:35.317 に答える