Package org.drools.process.instance.context.swimlane

Examples of org.drools.process.instance.context.swimlane.SwimlaneContextInstance


    protected String assignWorkItem(WorkItem workItem) {
        String actorId = null;
        // if this human task node is part of a swimlane, check whether an actor
        // has already been assigned to this swimlane
        String swimlaneName = getHumanTaskNode().getSwimlane();
        SwimlaneContextInstance swimlaneContextInstance = getSwimlaneContextInstance(swimlaneName);
        if (swimlaneContextInstance != null) {
            actorId = swimlaneContextInstance.getActorId(swimlaneName);
        }
        // if no actor can be assigned based on the swimlane, check whether an
        // actor is specified for this human task
        if (actorId == null) {
          actorId = (String) workItem.getParameter("ActorId");
          if (actorId != null && swimlaneContextInstance != null) {
            swimlaneContextInstance.setActorId(swimlaneName, actorId);
          }
        }
        return actorId;
    }
View Full Code Here


    private SwimlaneContextInstance getSwimlaneContextInstance(String swimlaneName) {
        if (this.swimlaneContextInstance == null) {
            if (swimlaneName == null) {
                return null;
            }
            SwimlaneContextInstance swimlaneContextInstance =
                (SwimlaneContextInstance) resolveContextInstance(
                    SwimlaneContext.SWIMLANE_SCOPE, swimlaneName);
            if (swimlaneContextInstance == null) {
                throw new IllegalArgumentException(
                    "Could not find swimlane context instance");
View Full Code Here

        return this.swimlaneContextInstance;
    }
   
    public void triggerCompleted(WorkItem workItem) {
        String swimlaneName = getHumanTaskNode().getSwimlane();
        SwimlaneContextInstance swimlaneContextInstance = getSwimlaneContextInstance(swimlaneName);
        if (swimlaneContextInstance != null) {
            String newActorId = (String) workItem.getResult("ActorId");
            if (newActorId != null) {
                swimlaneContextInstance.setActorId(swimlaneName, newActorId);
            }
        }
        super.triggerCompleted(workItem);
    }
View Full Code Here

      }
    }

    int nbSwimlanes = stream.readInt();
    if (nbSwimlanes > 0) {
      SwimlaneContextInstance swimlaneContextInstance = (SwimlaneContextInstance) processInstance
          .getContextInstance(SwimlaneContext.SWIMLANE_SCOPE);
      for (int i = 0; i < nbSwimlanes; i++) {
        String name = stream.readUTF();
        String value = stream.readUTF();
        swimlaneContextInstance.setActorId(name, value);
      }
    }

    while (stream.readShort() == PersisterEnums.NODE_INSTANCE) {
      readNodeInstance(context, processInstance, processInstance);
View Full Code Here

            }
        }

        int nbSwimlanes = stream.readInt();
        if ( nbSwimlanes > 0 ) {
            SwimlaneContextInstance swimlaneContextInstance = (SwimlaneContextInstance) processInstance.getContextInstance( SwimlaneContext.SWIMLANE_SCOPE );
            for ( int i = 0; i < nbSwimlanes; i++ ) {
                String name = stream.readUTF();
                String value = stream.readUTF();
                swimlaneContextInstance.setActorId( name,
                                                    value );
            }
        }

        while ( stream.readShort() == PersisterEnums.NODE_INSTANCE ) {
View Full Code Here

        for ( String key : keys ) {
            stream.writeUTF( key );
            stream.writeObject( variables.get( key ) );
        }

        SwimlaneContextInstance swimlaneContextInstance = (SwimlaneContextInstance) workFlow.getContextInstance( SwimlaneContext.SWIMLANE_SCOPE );
       
        if (swimlaneContextInstance!=null) {
      Map<String, String> swimlaneActors = swimlaneContextInstance
          .getSwimlaneActors();
      stream.writeInt(swimlaneActors.size());
      for (Map.Entry<String, String> entry : swimlaneActors.entrySet()) {
        stream.writeUTF(entry.getKey());
        stream.writeUTF(entry.getValue());
View Full Code Here

        for ( String key : keys ) {
            stream.writeUTF( key );
            stream.writeObject( variables.get( key ) );
        }

        SwimlaneContextInstance swimlaneContextInstance = (SwimlaneContextInstance) processInstance.getContextInstance( SwimlaneContext.SWIMLANE_SCOPE );
        Map<String, String> swimlaneActors = swimlaneContextInstance.getSwimlaneActors();
        stream.writeInt( swimlaneActors.size() );
        for ( Map.Entry<String, String> entry : swimlaneActors.entrySet() ) {
            stream.writeUTF( entry.getKey() );
            stream.writeUTF( entry.getValue() );
        }
View Full Code Here

            }
        }

        int nbSwimlanes = stream.readInt();
        if ( nbSwimlanes > 0 ) {
            SwimlaneContextInstance swimlaneContextInstance = (SwimlaneContextInstance) processInstance.getContextInstance( SwimlaneContext.SWIMLANE_SCOPE );
            for ( int i = 0; i < nbSwimlanes; i++ ) {
                String name = stream.readUTF();
                String value = stream.readUTF();
                swimlaneContextInstance.setActorId( name,
                                                    value );
            }
        }

        while ( stream.readShort() == PersisterEnums.NODE_INSTANCE ) {
View Full Code Here

            }
        }

        int nbSwimlanes = stream.readInt();
        if ( nbSwimlanes > 0 ) {
            SwimlaneContextInstance swimlaneContextInstance = (SwimlaneContextInstance) processInstance.getContextInstance( SwimlaneContext.SWIMLANE_SCOPE );
            for ( int i = 0; i < nbSwimlanes; i++ ) {
                String name = stream.readUTF();
                String value = stream.readUTF();
                swimlaneContextInstance.setActorId( name,
                                                    value );
            }
        }

        while ( stream.readShort() == PersisterEnums.NODE_INSTANCE ) {
View Full Code Here

        for ( String key : keys ) {
            stream.writeUTF( key );
            stream.writeObject( variables.get( key ) );
        }

        SwimlaneContextInstance swimlaneContextInstance = (SwimlaneContextInstance) processInstance.getContextInstance( SwimlaneContext.SWIMLANE_SCOPE );
        Map<String, String> swimlaneActors = swimlaneContextInstance.getSwimlaneActors();
        stream.writeInt( swimlaneActors.size() );
        for ( Map.Entry<String, String> entry : swimlaneActors.entrySet() ) {
            stream.writeUTF( entry.getKey() );
            stream.writeUTF( entry.getValue() );
        }
View Full Code Here

TOP

Related Classes of org.drools.process.instance.context.swimlane.SwimlaneContextInstance

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.