From 7a6089e7b3b214d9ff56ee349104e7941cc5caa2 Mon Sep 17 00:00:00 2001 From: jinyoung jang Date: Wed, 29 Mar 2017 20:12:26 +0900 Subject: [PATCH] mark for slow operations : https://github.com/TheOpenCloudEngine/uengine-bpm/issues/15 --- .../essencia/enactment/AlphaGameBoard.java | 11 +++++++---- essencia-portal/pom.xml | 6 ++++++ .../src/main/webapp/WEB-INF/customContext.xml | 16 ++++++++++++++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/essencia-core/src/main/java/org/uengine/essencia/enactment/AlphaGameBoard.java b/essencia-core/src/main/java/org/uengine/essencia/enactment/AlphaGameBoard.java index 3f326b2..e90091b 100644 --- a/essencia-core/src/main/java/org/uengine/essencia/enactment/AlphaGameBoard.java +++ b/essencia-core/src/main/java/org/uengine/essencia/enactment/AlphaGameBoard.java @@ -4,6 +4,7 @@ import org.metaworks.Instance; import org.metaworks.MetaworksContext; import org.metaworks.annotation.*; +import org.metaworks.dao.TransactionAdvice; import org.metaworks.dao.TransactionContext; import org.metaworks.dwr.MetaworksRemoteService; import org.uengine.essencia.model.Alpha; @@ -169,6 +170,8 @@ public void setMetaworksContext(MetaworksContext metaworksContext) { @Available(when="edit") public AlphaGameBoard addAlphaInstance(@Payload("instanceId") String instanceId, @Payload("alpha") Alpha alpha) throws Exception { + TransactionContext.getThreadLocalInstance().setMW3FaceOptionEnabled(false); + //TODO: [tunning] find why there is no proper className firstly if(alpha.getFieldDescriptors()==null){ LanguageElementInstance alphaInstance = alpha.createObjectInstance(); @@ -178,7 +181,7 @@ public AlphaGameBoard addAlphaInstance(@Payload("instanceId") String instanceId, alphaInstance.setClassName("codi/" + instance.getProcessDefinition().getId() + "#" + alphaInstance.getClassDefinition().getName()); - alphaInstance.fillClassDefinition(alphaInstance.getClassName()); + alphaInstance.fillClassDefinition(alphaInstance.getClassName()); //// alpha = (Alpha) alphaInstance.getLanguageElement(); } @@ -190,7 +193,7 @@ public AlphaGameBoard addAlphaInstance(@Payload("instanceId") String instanceId, ProcessInstance instance = processManagerRemote.getProcessInstance(getInstanceId()); - ProcessVariableValue processVariableValue = instance.getMultiple("", alpha.getName()); + ProcessVariableValue processVariableValue = instance.getMultiple("", alpha.getName()); // if(processVariableValue==null){ processVariableValue = new ProcessVariableValue(); @@ -201,12 +204,12 @@ public AlphaGameBoard addAlphaInstance(@Payload("instanceId") String instanceId, instance.set("", processVariableValue); - processManagerRemote.applyChanges(); + processManagerRemote.applyChanges(); /// EssenceProcessDefinition essenceProcessDefinition = (EssenceProcessDefinition) instance.getProcessDefinition(); PracticeDefinition practiceDefinition = essenceProcessDefinition.getPracticeDefinition(); - GameBoard gameBoard = new GameBoard(instance, true); + GameBoard gameBoard = new GameBoard(instance, true); // AlphaGameBoard alphaGameBoard = new AlphaGameBoard(getInstanceId(), (Alpha) practiceDefinition.getElementByName(alpha.getName()), gameBoard.getAlphaInstancesMap()); alphaGameBoard.getMetaworksContext().setWhen(MetaworksContext.WHEN_EDIT); diff --git a/essencia-portal/pom.xml b/essencia-portal/pom.xml index 2802015..09185c8 100644 --- a/essencia-portal/pom.xml +++ b/essencia-portal/pom.xml @@ -68,6 +68,12 @@ hibernate-validator 4.2.0.Final + + + org.uengine + uengine-persistence-couchbase + ${uengine.uengine-bpm.version} + diff --git a/essencia-portal/src/main/webapp/WEB-INF/customContext.xml b/essencia-portal/src/main/webapp/WEB-INF/customContext.xml index e6a5a92..0bed389 100644 --- a/essencia-portal/src/main/webapp/WEB-INF/customContext.xml +++ b/essencia-portal/src/main/webapp/WEB-INF/customContext.xml @@ -13,12 +13,24 @@ - - + + + + + + + + + + + + + +