CRM example
Step by step to debug IC inbox workflow ws14000164
C4c
Hybris
Hybris workflow'sFramework implementation codeIn this folder:
The workflow used at the application layer has the so-called workflow template concept like ABAP workflow. Is an example of ABAP workflow template:
Hybris workflow:
It is also defined through IMPEX:
IMPEX includes? Workflowtemplate ,? Workflowactiontemplate ,? Workflowdecisiontemplate ,? Workflowactiontemplatelinktemplaterelation models of the Four Types
1. A workflow has at least three types of actions (start/normal/end ).
2. A single action has at least one type of demo-
3. A describe can pass? Workflowactiontemplatelinktemplaterelation? Link to the next action until the end node ends.
Create workflow and trigger deworkflow:
public void autoCreateWorkFlow(PrincipalModel principal, KeyInfoModel info) { validateParameterNotNull(principal, "principal model cannot be null"); UserModel admin = userService.getUserForUID(ADMIN_CODE); WorkflowTemplateModel workflowTemplate = workflowTemplateService.getWorkflowTemplateForCode(workflowTemplateCode); //create a new workflow for given workflowtemplate final WorkflowModel workflow = workflowService.createWorkflow(workflowTemplate, admin); //add attachment for workflow final WorkflowItemAttachmentModel attachment = modelService.create(WorkflowItemAttachmentModel.class); AbstractOrderEntryModel orderEntry = info.getOrderEntry(); attachment.setItem(info.getOrderEntry()); attachment.setWorkflow(workflow); attachment.setCode(orderEntry.getPk()+"_OrderEntry"); this.modelService.save(attachment); this.modelService.refresh(attachment); workflow.setAttachments(Collections.singletonList(attachment)); workflowProcessingService.startWorkflow(workflow); this.autoDoStartDecision(workflow, admin);}
For more original Jerry technical articles, follow the Public Account "Wang zixi" or scan the following QR code:
Introduction to CRM, c4c, and hybris workflows