tokobayashiの日記 このページをアンテナに追加 RSSフィード

2018-07-10 casemgmt殴り書きメモ

[]casemgmt殴り書きメモ casemgmt殴り書きメモを含むブックマーク

jBPM70Ex005_casemgmt

ProcessJPATest.testAddUserTaskToCaseWithStage()

UserTaskCase.bpmn2 : adhoc process

UserTaskWithStageCase.bpmn2 : adhoc process

casemgmt is operated by service classses:

  • org.jbpm.casemgmt.impl.CaseServiceImpl
    • org.jbpm.casemgmt.impl.CaseRuntimeDataServiceImpl

  • CaseFileInstance caseFile = caseService.newCaseFileInstance(deploymentUnit.getIdentifier(), USER_TASK_CASE_P_ID, data, roleAssignments);
    • get CaseDefinition
    • create CaseFileInstanceImpl
  • String caseId = caseService.startCase(deploymentUnit.getIdentifier(), USER_TASK_STAGE_CASE_P_ID, caseFile);
    • generate caseId
    • processService.execute(StartCaseCommand)
      • addEventListener to capture events for "RuleFlow-AdHocActivate-" rule match
      • Insert caseFile into WorkingMemory
      • FireAllRules
      • startProcess with CorrelationKey(caseId) : processId = caseDefinitionId (so it's "UserTaskWithStageCase")
      • singalEvent for captured events
  • CaseInstance cInstance = caseService.getCaseInstance(caseId);
    • Use <named-query name="getCaseInstanceById">
  • caseService.addDynamicTaskToStage(FIRST_CASE_ID, stage.getId(), caseService.newHumanTaskSpec("First task", "test", "john", null, parameters));
    • processService.execute(AddDynamicTaskToStageCommand)
      • Add a WorkItem
  • Collection<ProcessInstanceDesc> caseProcessInstances = caseRuntimeDataService.getProcessInstancesForCase(caseId, new QueryContext());
    • simeply get a prorcessInstance ... runtimeDataService.getProcessInstancesByCorrelationKey()
  • caseService.cancelCase(caseId);
    • processService.execute(CancelCaseCommand)
      • get all process instances
      • abort all process instances
      • if (destory == true), destroy ksession and mapping

===

What is "Stage"?

It's adhoc subprocess in the process.

Thread [main] (Suspended (breakpoint at line 40 in CaseStageImpl))	
	owns: KModuleDeploymentService  (id=85)	
	CaseStageImpl.<init>(String, String, Collection<AdHocFragment>) line: 40	
	CaseRuntimeDataServiceImpl.collectCaseStages(String, String, NodeContainer) line: 728	
	CaseRuntimeDataServiceImpl.onDeploy(DeploymentEvent) line: 167	
	KModuleDeploymentService(AbstractDeploymentService).notifyOnDeploy(DeploymentUnit, DeployedUnit) line: 96	
	KModuleDeploymentService(AbstractDeploymentService).commonDeploy(DeploymentUnit, DeployedUnitImpl, RuntimeEnvironment, KieContainer) line: 163	
	KModuleDeploymentService.deploy(DeploymentUnit) line: 200	
	ProcessJPATest(AbstractCaseServicesBaseTest).prepareDeploymentUnit() line: 223	
	ProcessJPATest(AbstractCaseServicesBaseTest).setUp() line: 186	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 497	
	FrameworkMethod$1.runReflectiveCall() line: 50	
	FrameworkMethod$1(ReflectiveCallable).run() line: 12	
	FrameworkMethod.invokeExplosively(Object, Object...) line: 47	
	RunBefores.evaluate() line: 24	
	RunAfters.evaluate() line: 27	
	BlockJUnit4ClassRunner(ParentRunner<T>).runLeaf(Statement, Description, RunNotifier) line: 325	
	BlockJUnit4ClassRunner.runChild(FrameworkMethod, RunNotifier) line: 78	
	BlockJUnit4ClassRunner.runChild(Object, RunNotifier) line: 57	
	ParentRunner$3.run() line: 290	
	ParentRunner$1.schedule(Runnable) line: 71	
	BlockJUnit4ClassRunner(ParentRunner<T>).runChildren(RunNotifier) line: 288	
	ParentRunner<T>.access$000(ParentRunner, RunNotifier) line: 58	
	ParentRunner$2.evaluate() line: 268	
	BlockJUnit4ClassRunner(ParentRunner<T>).run(RunNotifier) line: 363	
	JUnit4TestReference.run(TestExecution) line: 86	
	TestExecution.run(ITestReference[]) line: 38	
	RemoteTestRunner.runTests(String[], String, TestExecution) line: 459	
	RemoteTestRunner.runTests(TestExecution) line: 675	
	RemoteTestRunner.run() line: 382	
	RemoteTestRunner.main(String[]) line: 192	
トラックバック - http://d.hatena.ne.jp/tokobayashi/20180710

2018-06-27 Entando備忘録

トラックバック - http://d.hatena.ne.jp/tokobayashi/20180627

2018-05-28 LibreOffice備忘録 このエントリーを含むブックマーク

  • Paper size が Letter
    • Tools -> Options -> Language Settings -> Languages -> Local Setting を English(UK) に
    • 別名でsave
トラックバック - http://d.hatena.ne.jp/tokobayashi/20180528

2018-02-11 Python入門 このエントリーを含むブックマーク

トラックバック - http://d.hatena.ne.jp/tokobayashi/20180211

2018-01-23 Jenkins 備忘録 このエントリーを含むブックマーク

Jenkins 備忘録

sudo service jenkins start

http://localhost:8080

ver. 2.89.3

mavenセットアップ

Manage Jenkins -> Global Tool Configuration -> Maven -> "Install automatically", "Install from Apache"

github連携

https://ics.media/entry/2869

トラックバック - http://d.hatena.ne.jp/tokobayashi/20180123