<dependency>
<groupId>de.hybris.platform</groupId>
<artifactId>processengine</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>
PATH_TO_HYBRIS_PLATFORM_DIR/ext/processing/bin/processingserver.jar
</systemPath>
</dependency>
|
import org.springframework.http.HttpEntity; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import de.hybris.platform.processengine.transformer.bpmnhybris.data.BpmnProcessData; import de.hybris.platform.processengine.transformer.bpmnhybris.service.BpmnProcessConversionService; @org.springframework.web.bind.annotation.RestController @RequestMapping("/restapi") public class BPMNHybrisTransform { private BpmnProcessConversionService bpmnservice; @RequestMapping(value = "/bpmnhybristransformJSON", method = RequestMethod.POST, consumes = MediaType.APPLICATION_XML_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public BpmnProcessData processTransformationJSON(HttpEntity<String> httpEntity) { String processxml = httpEntity.getBody(); return bpmnservice.convertProcess(processxml); } @RequestMapping(value = "/bpmnhybristransformation", method = RequestMethod.POST, consumes = MediaType.APPLICATION_XML_VALUE, produces = MediaType.APPLICATION_XML_VALUE) @ResponseBody public String processTransformationXML(HttpEntity<String> httpEntity) { String processxml = httpEntity.getBody(); BpmnProcessData bpmnProcessData = bpmnservice.convertProcess(processxml); return (BpmnProcessData.ProcessType.HYBRIS.equals(bpmnProcessData.getProcessType())?bpmnProcessData.getProcessContent():bpmnProcessData.getBpmnContent()); } public BpmnProcessConversionService getBpmnservice() { return bpmnservice; } public void setBpmnservice(BpmnProcessConversionService bpmnservice) { this.bpmnservice = bpmnservice; } } |
<bean id="bpmnhybristransform"class="com.hybris.transformer.BPMNHybrisTransform"> <property name="bpmnservice"ref="bpmnservice" /> </bean> |
<bpmn2:dataObject id="DataObject_2" name="de.hybris.platform.orderprocessing.model.OrderProcessModel as processClass"> <bpmn2:dataState id="DataState_1" name="Data State 1" /> </bpmn2:dataObject> |
<?xml version="1.0" encoding="UTF-8"?> <!-- origin at X=0.0 Y=0.0 --> <bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:ns="http://www.w3.org/2001/XMLSchema" id="_ESxmkE7AEeibvZO4ZeVwrQ" exporter="org.eclipse.bpmn2.modeler.core" exporterVersion="1.4.2.Final-v20171109-1930-B1"> <bpmn2:process id="demo-order-process" name="demo-order-process" isExecutable="false"> <bpmn2:dataObject id="DataObject_2" name="de.hybris.platform.orderprocessing.model.OrderProcessModel as processClass"> <bpmn2:dataState id="DataState_1" name="Data State 1"/> </bpmn2:dataObject> </bpmn2:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1"> <bpmndi:BPMNShape id="BPMNShape_DataObject_1" bpmnElement="DataObject_2"> <dc:Bounds height="50.0" width="36.0" x="160.0" y="380.0"/> <bpmndi:BPMNLabel id="BPMNLabel_1" labelStyle="BPMNLabelStyle_1"> <dc:Bounds height="66.0" width="79.0" x="139.0" y="430.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> <bpmndi:BPMNLabelStyle id="BPMNLabelStyle_1"> <dc:Font name="arial" size="9.0"/> </bpmndi:BPMNLabelStyle> </bpmndi:BPMNDiagram> </bpmn2:definitions> |
<?xml version="1.0" encoding="UTF-8"?> <bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:ns="http://www.w3.org/2001/XMLSchema" id="_ESxmkE7AEeibvZO4ZeVwrQ" exporter="org.eclipse.bpmn2.modeler.core" exporterVersion="1.4.2.Final-v20171109-1930-B1"> <bpmn2:process id="demo-order-process" name="demo-order-process" isExecutable="false"> <bpmn2:dataObject id="DataObject_2" name="de.hybris.platform.orderprocessing.model.OrderProcessModel as processClass"> <bpmn2:dataState id="DataState_1" name="Data State 1" /> </bpmn2:dataObject> <bpmn2:startEvent id="StartEvent_0vtbr1u" name="Start"> <bpmn2:outgoing>SequenceFlow_1wylk4m</bpmn2:outgoing> </bpmn2:startEvent> <bpmn2:task id="Task_05i4bfq" name="checkOrder"> <bpmn2:incoming>SequenceFlow_1wylk4m</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0rgp3tu</bpmn2:outgoing> </bpmn2:task> <bpmn2:sequenceFlow id="SequenceFlow_1wylk4m" sourceRef="StartEvent_0vtbr1u" targetRef="Task_05i4bfq" /> <bpmn2:endEvent id="EndEvent_12n08mi" name="End"> <bpmn2:incoming>SequenceFlow_0rgp3tu</bpmn2:incoming> </bpmn2:endEvent> <bpmn2:sequenceFlow id="SequenceFlow_0rgp3tu" name="OK" sourceRef="Task_05i4bfq" targetRef="EndEvent_12n08mi" /> </bpmn2:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="demo-order-process"> <bpmndi:BPMNShape id="BPMNShape_DataObject_1" bpmnElement="DataObject_2"> <dc:Bounds x="160" y="380" width="36" height="50" /> <bpmndi:BPMNLabel id="BPMNLabel_1" labelStyle="BPMNLabelStyle_1"> <dc:Bounds x="139" y="430" width="79" height="66" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="StartEvent_0vtbr1u_di" bpmnElement="StartEvent_0vtbr1u"> <dc:Bounds x="171" y="283" width="36" height="36" /> <bpmndi:BPMNLabel> <dc:Bounds x="177" y="326" width="24" height="13" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Task_05i4bfq_di" bpmnElement="Task_05i4bfq"> <dc:Bounds x="257" y="261" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1wylk4m_di" bpmnElement="SequenceFlow_1wylk4m"> <di:waypoint x="207" y="301" /> <di:waypoint x="257" y="301" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_12n08mi_di" bpmnElement="EndEvent_12n08mi"> <dc:Bounds x="407" y="283" width="36" height="36" /> <bpmndi:BPMNLabel> <dc:Bounds x="415" y="326" width="20" height="13" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0rgp3tu_di" bpmnElement="SequenceFlow_0rgp3tu"> <di:waypoint x="357" y="301" /> <di:waypoint x="407" y="301" /> <bpmndi:BPMNLabel> <dc:Bounds x="374" y="283" width="16" height="13" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> <bpmndi:BPMNLabelStyle id="BPMNLabelStyle_1"> <dc:Font name="arial" size="9" /> </bpmndi:BPMNLabelStyle> </bpmndi:BPMNDiagram> </bpmn2:definitions> |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |