Package com.easydesk.workflow
Class EasyDeskWorkflow
java.lang.Object
com.easydesk.workflow.DefaultWorkflow
com.easydesk.workflow.OMWorkflow
com.easydesk.workflow.EasyDeskWorkflow
- All Implemented Interfaces:
Workflow
This is EasyDeskWorkflow
- Version:
- $Id: EasyDeskWorkflow.java,v 1.316 2009/03/14 04:21:43 youngho Exp $
- Author:
- Youngho Cho
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.easydesk.workflow.Workflow
Workflow.Action -
Field Summary
Fields inherited from class com.easydesk.workflow.OMWorkflow
ATTRIBUTE_OPTION_CLASS_NAME, pipelineServiceFields inherited from interface com.easydesk.workflow.Workflow
PACKAGE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDependencyWorkflow(Depend depend, ActivitySet activitySet, EasyDeskUser user) 새로운 Dependancy 를 등록하였을 때voidaddItemWorkflow(Item item, Map<Integer, AttributeValue> newAttVals, EasyDeskUser user, ActivitySet activitySet) Item 을 System 에 입력시 속성들의 기본값을 설정 ...voidaddWorkflowsForOption(AttributeOption option, Module module, ItemType itemType) ModuleAttributeOption 의 등록시 실행된다.voidafter(ActivitySet activitySet, Map<Integer, AttributeValue> newAttVals) After 동작이다.canMakeTransition(EasyDeskUser actor, Item item, Transition transition, Map<Integer, AttributeValue> newValues, TransitionScopeEnum tScope, Attribute attribute) CanMakeTransition 의 정의protected Collection<Condition> checkSecurityConditions(TransitionScopeEnum tScope, Map<Attribute, Collection<Condition>> securityBlockers, EasyDeskUser user, Item item, Map<Integer, AttributeValue> newValues) Filtered Condition 들중 Role 과 Permission 을 처리한다.voiddeleteDependencyWorkflow(Depend depend, ActivitySet activitySet, EasyDeskUser user) Same as addDependencyWorkflow AcitvitySet 으로 구분한다.protected Map<Attribute, Collection<Condition>> filterConditions(EasyDeskUser user, Item item, Transition transition, TransitionScopeEnum tScope, Map<Integer, AttributeValue> newValues, Attribute attribute) blocking conditions map attribute vs conditionSetgetConditionTester(Attribute attribute) Attribute 의 Condition Tester 를 구한다.booleangrantUser(Module module, EasyDeskUser grantee, String roleName, ActivitySet activitySet) 사용자를 module 에 역할을 부여할 때booleanhasConsistency(AttributeValue value) 설정이 아니라 코드에 의하여 처리되어야 만 하는 것들booleanisSatisfied(TransitionSequence transitionSequence, Item item) 현재 item 의 상태가 transition 이 진행되었는지 확인을 한다.searchBlockedCondition(TransitionScopeEnum tScope, Map<Attribute, Collection<Condition>> blockedMap, EasyDeskUser user, Item item, Map<Integer, AttributeValue> newValues) 1차로 Filtering 된 조건중에 BlockedCondition 을 찾는다.voidupdateItemWorkflow(Item item, Map<Integer, AttributeValue> newAttVals, EasyDeskUser user, ActivitySet activitySet) Item 을 수정시 속성들의 기본값을 설정 ...Methods inherited from class com.easydesk.workflow.OMWorkflow
add, modifyMethods inherited from class com.easydesk.workflow.DefaultWorkflow
add, add, after, before, changeModuleItemTypeWorkflow, deleteWorkflowsForAttribute, deleteWorkflowsForOption, modify, remove, resetAllWorkflowsForItemType, revokeUser
-
Constructor Details
-
EasyDeskWorkflow
public EasyDeskWorkflow()
-
-
Method Details
-
addWorkflowsForOption
public void addWorkflowsForOption(AttributeOption option, Module module, ItemType itemType) throws WorkflowException ModuleAttributeOption 의 등록시 실행된다.2. Executer Selector RuleSet Name : attributeTypeName + 'Option'
- Specified by:
addWorkflowsForOptionin interfaceWorkflow- Overrides:
addWorkflowsForOptionin classDefaultWorkflow- Parameters:
option- DOCUMENT ME!module- DOCUMENT ME!itemType- DOCUMENT ME!- Throws:
WorkflowException- DOCUMENT ME!- See Also:
-
after
public void after(ActivitySet activitySet, Map<Integer, AttributeValue> newAttVals) throws WorkflowExceptionAfter 동작이다. attributeValue 가 변경되었을 때 연동되어 변경되는 것들 처리 예를 들면 어떤 사용자의 담당과목이 변경되면 이 사용자의 다른 UserItem 의 담당과목을 모두 동기시킨다.- Specified by:
afterin interfaceWorkflow- Overrides:
afterin classDefaultWorkflow- Parameters:
activitySet-newAttVals-- Throws:
WorkflowException- workflow 처리 중 오류가 발생한 경우
-
hasConsistency
설정이 아니라 코드에 의하여 처리되어야 만 하는 것들- Specified by:
hasConsistencyin interfaceWorkflow- Overrides:
hasConsistencyin classDefaultWorkflow- Parameters:
value-- Returns:
- true/false
- Throws:
WorkflowException- 확인 중 오류가 발생한 경우
-
isSatisfied
public boolean isSatisfied(TransitionSequence transitionSequence, Item item) throws WorkflowException 현재 item 의 상태가 transition 이 진행되었는지 확인을 한다.- Specified by:
isSatisfiedin interfaceWorkflow- Overrides:
isSatisfiedin classDefaultWorkflow- Parameters:
transitionSequence-item-- Returns:
- transition 이 진행되었으면
true - Throws:
WorkflowException- 확인 중 오류가 발생한 경우
-
addItemWorkflow
public void addItemWorkflow(Item item, Map<Integer, AttributeValue> newAttVals, EasyDeskUser user, ActivitySet activitySet) throws WorkflowExceptionItem 을 System 에 입력시 속성들의 기본값을 설정 ...- Specified by:
addItemWorkflowin interfaceWorkflow- Overrides:
addItemWorkflowin classDefaultWorkflow- Parameters:
item-newAttVals-user- activityOwneractivitySet-- Throws:
WorkflowException- DOCUMENT ME!
-
updateItemWorkflow
public void updateItemWorkflow(Item item, Map<Integer, AttributeValue> newAttVals, EasyDeskUser user, ActivitySet activitySet) throws WorkflowExceptionItem 을 수정시 속성들의 기본값을 설정 ... 모든 아이템에 적용된다.Executer Selector RuleSet Name : fixed, ItemUpdate.xml
Executer Selector RuleSet : ItemType.getName() + "ItemUpdateExecuter"
- Specified by:
updateItemWorkflowin interfaceWorkflow- Overrides:
updateItemWorkflowin classDefaultWorkflow- Parameters:
item-newAttVals-user-activitySet-- Throws:
WorkflowException- workflow 처리 중 오류가 발생한 경우
-
canMakeTransition
public Object canMakeTransition(EasyDeskUser actor, Item item, Transition transition, Map<Integer, AttributeValue> newValues, TransitionScopeEnum tScope, Attribute attribute) CanMakeTransition 의 정의
actor A 가 아이템 B 에 대하여 D 의 동작을 진행할 때, B 의 속성 C 의 값을 E 에서 F 로 변경할 수 있는가 ?
Empty to Any : enter action, Any to Any : edit action, Any to Empty : remove action
실제 적용은 편집시 사용자가 Transition 에 대하여 아이템의 속성을 from 에서 to 로 이동시킬수 있는지 주의 대상 행동은 편집이다.
D 동작에 대하여 ActivitySet 에 정의된 모든것을 처리하고 싶지만 이경우 Condition Table 도 같이 변경되어 너무 복잡하여 진다.
확인 순서는 Module > ItemType > Global 의 순서로 처리가 된다.
- Specified by:
canMakeTransitionin interfaceWorkflow- Overrides:
canMakeTransitionin classDefaultWorkflow- Parameters:
actor- actor Aitem- acted item B which contains attribute Ctransition- target transition : a change of attributeValue C:[E TO F], if transition is not defined then always pass ( activitySetType D if not defined then assume Access )newValues- { attributeId, attributeValue }tScope-attribute- attribute- Returns:
- null (no constraints) or contraint condition object or error object
-
grantUser
public boolean grantUser(Module module, EasyDeskUser grantee, String roleName, ActivitySet activitySet) throws WorkflowException 사용자를 module 에 역할을 부여할 때- Specified by:
grantUserin interfaceWorkflow- Overrides:
grantUserin classDefaultWorkflow- Parameters:
module- modulegrantee- grantee target userroleName- roleNameactivitySet- can not be null- Returns:
- true granted or false pendingitem created
- Throws:
WorkflowException- workflow 처리 중 오류가 발생한 경우
-
addDependencyWorkflow
public void addDependencyWorkflow(Depend depend, ActivitySet activitySet, EasyDeskUser user) throws WorkflowException 새로운 Dependancy 를 등록하였을 때Executer Selector RuleSet Name : Dependancy
- Specified by:
addDependencyWorkflowin interfaceWorkflow- Overrides:
addDependencyWorkflowin classDefaultWorkflow- Parameters:
depend-activitySet-user-- Throws:
WorkflowException- DOCUMENT ME!
-
deleteDependencyWorkflow
public void deleteDependencyWorkflow(Depend depend, ActivitySet activitySet, EasyDeskUser user) throws WorkflowException Same as addDependencyWorkflow AcitvitySet 으로 구분한다.- Specified by:
deleteDependencyWorkflowin interfaceWorkflow- Overrides:
deleteDependencyWorkflowin classDefaultWorkflow- Parameters:
depend- DOCUMENT ME!activitySet- DOCUMENT ME!user- DOCUMENT ME!- Throws:
WorkflowException- DOCUMENT ME!- See Also:
-
getConditionTester
Attribute 의 Condition Tester 를 구한다. AttributeName Executer or DefaultConditionTester- Specified by:
getConditionTesterin interfaceWorkflow- Overrides:
getConditionTesterin classDefaultWorkflow- Parameters:
attribute- rAttribute- Returns:
- executable Condition Tester
- Throws:
Exception- DOCUMENT ME!
-
searchBlockedCondition
protected List<Condition> searchBlockedCondition(TransitionScopeEnum tScope, Map<Attribute, Collection<Condition>> blockedMap, EasyDeskUser user, Item item, Map<Integer, throws ExceptionAttributeValue> newValues) 1차로 Filtering 된 조건중에 BlockedCondition 을 찾는다.- Parameters:
tScope-blockedMap-user-item-newValues-- Returns:
- Throws:
Exception
-
filterConditions
protected Map<Attribute,Collection<Condition>> filterConditions(EasyDeskUser user, Item item, Transition transition, TransitionScopeEnum tScope, Map<Integer, AttributeValue> newValues, Attribute attribute) throws TorqueExceptionblocking conditions map attribute vs conditionSet- Parameters:
user- current actoritem-transition-tScope-newValues-attribute- for attribute transition- Returns:
- blocking conditions map
- Throws:
TorqueException
-
checkSecurityConditions
protected Collection<Condition> checkSecurityConditions(TransitionScopeEnum tScope, Map<Attribute, Collection<Condition>> securityBlockers, EasyDeskUser user, Item item, Map<Integer, throws ExceptionAttributeValue> newValues) Filtered Condition 들중 Role 과 Permission 을 처리한다.- Parameters:
tScope-securityBlockers-user-item-newValues-- Returns:
- Throws:
Exception
-