Package com.founder.fix.fixflow.core.impl.task

Examples of com.founder.fix.fixflow.core.impl.task.IdentityLinkEntity


import com.founder.fix.fixflow.expand.database.TableUtil;

public class UpdateIdentityLink implements UpdateRulesScript {

  public void execute(Object parameter, SqlCommand sqlCommand, ProcessEngineConfigurationImpl processEngineConfiguration) {
    IdentityLinkEntity identityLink=(IdentityLinkEntity)parameter;
    Object[] objectParamWhere = new Object[1];
    objectParamWhere[0]=identityLink.getId() ;
    sqlCommand.update(TableUtil.getTaskTdentityLinkRunTableName(),  identityLink.getPersistentDbMap(), " ID=?",objectParamWhere);
  }
View Full Code Here


import com.founder.fix.fixflow.expand.database.TableUtil;

public class InsertIdentityLink implements InsertRulesScript {

  public void execute(Object parameter, SqlCommand sqlCommand, ProcessEngineConfigurationImpl processEngineConfiguration) {
    IdentityLinkEntity identityLink=(IdentityLinkEntity)parameter;
    sqlCommand.insert(TableUtil.getTaskTdentityLinkRunTableName(),identityLink.getPersistentDbMap());
  }
View Full Code Here

  @Deployment(resources = { "com/founder/fix/fixflow/test/engine/api/task/TaskServiceNewTest.bpmn"})
  public void testSaveIdentityLink(){
   
    //创建任务候选人实体
    String identityLinkId = GuidUtil.CreateGuid();
    IdentityLinkEntity identityLinkEntity = new IdentityLinkEntity();
    identityLinkEntity.setId(identityLinkId);
    identityLinkEntity.setGroupId("groupId");
    identityLinkEntity.setUserId("userId");
    identityLinkEntity.setGroupType("groupType");
    identityLinkEntity.setType(IdentityLinkType.candidate);
    identityLinkEntity.setIncludeExclusion(IncludeExclusion.EXCLUSION);
    identityLinkEntity.setTaskId("taskId");
   
    //保存identityLinkEntity
    Context.getCommandContext().getIdentityLinkManager().saveIdentityLink(identityLinkEntity);
    //根据编号查询保存的identityLinkEntity
    IdentityLinkEntity identityLinkEntity2 = Context.getCommandContext().getIdentityLinkManager().selectIdentifyLinkById(identityLinkId);
    //验证查询出来的实体属性正确
    assertEquals(identityLinkId, identityLinkEntity2.getId());
    assertEquals("groupId",identityLinkEntity2.getGroupId());
    assertEquals("userId", identityLinkEntity2.getUserId());
    assertEquals("groupType", identityLinkEntity2.getGroupType());
    assertEquals("taskId", identityLinkEntity2.getTaskId());
    assertEquals(IdentityLinkType.candidate, identityLinkEntity2.getType());
    assertEquals(IncludeExclusion.EXCLUSION, identityLinkEntity2.getIncludeExclusion());
  }
View Full Code Here

   */
  @Deployment(resources = { "com/founder/fix/fixflow/test/engine/api/task/TaskServiceNewTest.bpmn"})
  public void testDeleteIdentityLinkByProcessInstanceId(){
    //创建任务候选人实体
    String identityLinkId = GuidUtil.CreateGuid();
    IdentityLinkEntity identityLinkEntity = new IdentityLinkEntity();
    identityLinkEntity.setId(identityLinkId);
    identityLinkEntity.setTaskId("taskId");
    //保存实体
    Context.getCommandContext().getIdentityLinkManager().saveIdentityLink(identityLinkEntity);
   
    //根据编号查询实体
    IdentityLinkEntity identityLinkEntity2 = Context.getCommandContext().getIdentityLinkManager().selectIdentifyLinkById(identityLinkId);
    //验证保存成功
    assertEquals(identityLinkId, identityLinkEntity2.getId());
    //创建任务实例
    TaskInstanceEntity taskInstanceEntity = new TaskInstanceEntity();
    //将任务实体与identityLink关联
    taskInstanceEntity.setId("taskId");
    taskInstanceEntity.setName("name");
View Full Code Here

   
  }

  public IdentityLink newIdentityLink(String linkId) {
   
    IdentityLink identityLink = new IdentityLinkEntity(linkId)
    return identityLink;
   
  }
View Full Code Here

*/
public class IdentityLinkStateMap implements BusinessRulesScript {

  public Object execute(Object parameter, SqlCommand sqlCommand,
      ProcessEngineConfigurationImpl processEngineConfiguration) {
    IdentityLinkEntity identityLinkEntity = (IdentityLinkEntity)parameter;
    Map<String,Object> objectParam = new HashMap<String, Object>();
    objectParam.put("id", identityLinkEntity.getId());
    objectParam.put("type", identityLinkEntity.getType().toString());
    objectParam.put("userId", identityLinkEntity.getUserId());
    objectParam.put("groupId", identityLinkEntity.getGroupId());
    objectParam.put("groupType", identityLinkEntity.getGroupType());
    objectParam.put("includeExclusion", identityLinkEntity.getIncludeExclusion().toString());
    objectParam.put("taskId", identityLinkEntity.getTaskId());
    objectParam.put("archiveTime", identityLinkEntity.getArchiveTime());
    Map<String,Object> persistenceExtensionFields=identityLinkEntity.getPersistenceExtensionFields()
    for (String key : persistenceExtensionFields.keySet()) {
      objectParam.put(key, persistenceExtensionFields.get(key))
    }
    return objectParam;
  }
View Full Code Here

public class IdentityLinkPersistentDbMap implements BusinessRulesScript {

  public Object execute(Object parameter, SqlCommand sqlCommand, ProcessEngineConfigurationImpl processEngineConfiguration) {
   
    IdentityLinkEntity identityLink=(IdentityLinkEntity)parameter;
   
    Map<String, Object> objectParam = new HashMap<String, Object>();
    objectParam.put("ID", identityLink.getId());
    objectParam.put("TYPE", StringUtil.getString(identityLink.getType()));
    objectParam.put("USER_ID", identityLink.getUserId());
    objectParam.put("GROUP_ID", identityLink.getGroupId());
    objectParam.put("GROUP_TYPE", identityLink.getGroupType());
    objectParam.put("INCLUDE_EXCLUSION", StringUtil.getString(identityLink.getIncludeExclusion()));
    objectParam.put("TASKINSTANCE_ID", identityLink.getTaskId());
    objectParam.put("ARCHIVE_TIME", identityLink.getArchiveTime());
   
   
    Map<String, Object> persistenceExtensionFields=identityLink.getPersistenceExtensionFields();   
    for (String key : persistenceExtensionFields.keySet()) {
      objectParam.put(key, persistenceExtensionFields.get(key));
    }
    return objectParam;
  }
View Full Code Here

TOP

Related Classes of com.founder.fix.fixflow.core.impl.task.IdentityLinkEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.