Examples of Assignment


Examples of nexj.core.meta.workflow.Assignment

    * @return The outer step.
    */
   public Step loadSemaphore(Element element, String sStepName,
      Activity outerActivity, Machine machine, ActivityLoader loader)
   {
      Assignment assignment = new Assignment(sStepName + ":Assignment");

      assignment.setActivity(outerActivity);
      assignment.setQueue(parseQueueName(XMLUtil.getStringAttr(element, "queue"), outerActivity, machine));
      assignment.setCaption(m_helper.parse(XMLUtil.getStringAttr(element, "title"),
         false, outerActivity.getFlow().getPosMap(), XMLUtil.getStringAttr(element, "caption"),
         m_metadata.getGlobalEnvironment()));
      assignment.setAssignee(m_helper.parse(XMLUtil.getStringAttr(element, "assignee"),
         false, outerActivity.getFlow().getPosMap(), assignment.getAssignee(), m_metadata.getGlobalEnvironment()));
      assignment.setOwner(m_helper.parse(XMLUtil.getStringAttr(element, "owner"),
         false, outerActivity.getFlow().getPosMap(), assignment.getOwner(), m_metadata.getGlobalEnvironment()));
      assignment.setFactory((Pair)m_helper.parse(XMLUtil.getStringAttr(element, "factory"),
         true, outerActivity.getFlow().getPosMap(), assignment.getFactory(),
         m_metadata.getGlobalEnvironment()));
      assignment.setSemaphore(true);
      outerActivity.addStep(assignment);

      Block block = new Block();

      block.setActivity(outerActivity);
      assignment.setNext(block);

      Activity blockActivity = block.getContainedActivity();

      Semaphore semaphore = new Semaphore(sStepName, assignment);

View Full Code Here

Examples of org.activiti.bpmn.model.Assignment

 
  protected static final Logger LOGGER = LoggerFactory.getLogger(DataAssociationParser.class.getName());

  public static void parseDataAssociation(DataAssociation dataAssociation, String elementName, XMLStreamReader xtr) {
    boolean readyWithDataAssociation = false;
    Assignment assignment = null;
    try {
     
      dataAssociation.setId(xtr.getAttributeValue(null, "id"));
     
      while (readyWithDataAssociation == false && xtr.hasNext()) {
        xtr.next();
        if (xtr.isStartElement() && ELEMENT_SOURCE_REF.equals(xtr.getLocalName())) {
          String sourceRef = xtr.getElementText();
          if (StringUtils.isNotEmpty(sourceRef)) {
            dataAssociation.setSourceRef(sourceRef.trim());
          }

        } else if (xtr.isStartElement() && ELEMENT_TARGET_REF.equals(xtr.getLocalName())) {
          String targetRef = xtr.getElementText();
          if (StringUtils.isNotEmpty(targetRef)) {
            dataAssociation.setTargetRef(targetRef.trim());
          }
         
        } else if (xtr.isStartElement() && ELEMENT_TRANSFORMATION.equals(xtr.getLocalName())) {
          String transformation = xtr.getElementText();
          if (StringUtils.isNotEmpty(transformation)) {
            dataAssociation.setTransformation(transformation.trim());
          }
         
        } else if (xtr.isStartElement() && ELEMENT_ASSIGNMENT.equals(xtr.getLocalName())) {
          assignment = new Assignment();
          BpmnXMLUtil.addXMLLocation(assignment, xtr);
         
        } else if (xtr.isStartElement() && ELEMENT_FROM.equals(xtr.getLocalName())) {
          String from = xtr.getElementText();
          if (assignment != null && StringUtils.isNotEmpty(from)) {
            assignment.setFrom(from.trim());
          }
         
        } else if (xtr.isStartElement() && ELEMENT_TO.equals(xtr.getLocalName())) {
          String to = xtr.getElementText();
          if (assignment != null && StringUtils.isNotEmpty(to)) {
            assignment.setTo(to.trim());
          }
         
        } else if (xtr.isEndElement() && ELEMENT_ASSIGNMENT.equals(xtr.getLocalName())) {
          if (StringUtils.isNotEmpty(assignment.getFrom()) && StringUtils.isNotEmpty(assignment.getTo())) {
            dataAssociation.getAssignments().add(assignment);
          }
         
        } else if (xtr.isEndElement() && elementName.equals(xtr.getLocalName())) {
          readyWithDataAssociation = true;
View Full Code Here

Examples of org.activiti.engine.impl.bpmn.data.Assignment

      for (org.activiti.bpmn.model.Assignment assigmentElement : dataAssociationElement.getAssignments()) {
        if (StringUtils.isNotEmpty(assigmentElement.getFrom()) && StringUtils.isNotEmpty(assigmentElement.getTo())) {
          Expression from = bpmnParse.getExpressionManager().createExpression(assigmentElement.getFrom());
          Expression to = bpmnParse.getExpressionManager().createExpression(assigmentElement.getTo());
          Assignment assignment = new Assignment(from, to);
          dataAssociation.addAssignment(assignment);
        }
      }
      return dataAssociation;
    }
View Full Code Here

Examples of org.apache.accumulo.server.master.state.Assignment

    // finish the split
    KeyExtent tablet = new KeyExtent(tableId, new Text("p"), new Text("o"));
    m = tablet.getPrevRowUpdateMutation();
    Constants.METADATA_SPLIT_RATIO_COLUMN.put(m, new Value("0.5".getBytes()));
    update(connector, m);
    metaDataStateStore.setLocations(Collections.singletonList(new Assignment(tablet, state.someTServer)));
   
    // onos... there's a new tablet online
    stats = scan(state, metaDataStateStore);
    Assert.assertEquals(MergeState.WAITING_FOR_CHOPPED, stats.nextMergeState(connector, state));
   
View Full Code Here

Examples of org.apache.s4.comm.topology.Assignment

        bind(RemoteStreams.class).toInstance(Mockito.mock(RemoteStreams.class));
        bind(RemoteSenders.class).toInstance(Mockito.mock(RemoteSenders.class));
        bind(RemoteEmitters.class).toInstance(Mockito.mock(RemoteEmitters.class));
        bind(RemoteEmitterFactory.class).toInstance(Mockito.mock(RemoteEmitterFactory.class));
        bind(Clusters.class).toInstance(Mockito.mock(Clusters.class));
        Assignment mockedAssignment = Mockito.mock(Assignment.class);
        Mockito.when(mockedAssignment.assignClusterNode()).thenReturn(new ClusterNode(0, 0, "machine", "Task-0"));
        bind(Assignment.class).toInstance(mockedAssignment);
        Names.bindProperties(binder(), ImmutableMap.of("s4.cluster.name", "testCluster"));
    }
View Full Code Here

Examples of org.candle.decompiler.intermediate.expression.Assignment

  }

  @Override
  public void visitStatementIntermediate(StatementIntermediate line) {
    //first, look for the
    Assignment assignment = extractConstantArrayAssignment(line.getExpression());
    if(assignment == null) {
      return;
    }
   
    //at this point, we know both the statement is an assignment, and that the left assignment is to a constant array value.
View Full Code Here

Examples of org.drools.planner.examples.nurserostering.domain.Assignment

        WorkingMemory workingMemory = localSearchSolverScope.getWorkingMemory();

        Score firstScore = localSearchSolverScope.calculateScoreFromWorkingMemory();
        // do AssignmentSwitchMove
        Employee leftEmployee = findEmployeeById(nurseRoster, 0L);
        Assignment leftAssignment = findAssignmentById(nurseRoster, 200204001L);
        assertEquals(leftEmployee, leftAssignment.getEmployee());
        Employee rightEmployee = findEmployeeById(nurseRoster, 12L);
        Assignment rightAssignment = findAssignmentById(nurseRoster, 200204002L);
        assertEquals(rightEmployee, rightAssignment.getEmployee());
        NurseRosteringMoveHelper.moveEmployee(workingMemory, leftAssignment, rightEmployee);
        NurseRosteringMoveHelper.moveEmployee(workingMemory, rightAssignment, leftEmployee);
        localSearchSolverScope.calculateScoreFromWorkingMemory();
        // undo AssignmentSwitchMove;
        NurseRosteringMoveHelper.moveEmployee(workingMemory, rightAssignment, rightEmployee);
View Full Code Here

Examples of org.eclipse.bpmn2.Assignment

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.ASSIGNMENT: {
            Assignment assignment = (Assignment) theEObject;
            T result = caseAssignment(assignment);
            if (result == null)
                result = caseBaseElement(assignment);
            if (result == null)
                result = defaultCase(theEObject);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Assignment

     *
     * @param expr
     * @param name
     */
    public void addAssignToName(Expression expr, String name) {
        Assignment asgn = m_ast.newAssignment();
        asgn.setLeftHandSide(m_ast.newSimpleName(name));
        asgn.setRightHandSide(expr);
        m_block.statements().add(m_ast.newExpressionStatement(asgn));
    }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.Assignment

      new CompoundAssignment(
        this.expressionStack[this.expressionPtr] ,
        expression,
        op,
        expression.sourceEnd):
      new Assignment(
        this.expressionStack[this.expressionPtr] ,
        expression,
        expression.sourceEnd);

  if (this.pendingRecoveredType != null) {
View Full Code Here
TOP
Copyright © 2015 www.massapi.com. 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.