CRM的例子
Step by Step to debug IC inbox workflow WS14000164
C4C

Custom recipient determination in workflow rule done on Account BO
Automatically send an Email notification to line manager via Workflow in Account application
Hybris
Hybris workflow的架構實作代碼在這個folder裡:
impex 中包括 WorkflowTemplate, WorkflowActionTemplate, WorkflowDecisionTemplate, WorkflowActionTemplateLinkTemplateRelation 這四種類型的model
1. 一個workflow至少有3三 種類型(start/normal/end)的 action
2. 一個action最少有一種decision
3. 一個decision 可以通過 WorkflowActionTemplateLinkTemplateRelation 連結到下一個action上 直到結束節點 end.
建立workflow及觸發decision:
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);
}