Package com.catify.processengine.core.processdefinition.jaxb

Examples of com.catify.processengine.core.processdefinition.jaxb.TDataObject


      if (((TCatchEvent) flowNodeJaxb).getDataOutputAssociation().size() > 0) {
        // TODO: only one data object supported, see redmine #96 (minor
        // task)
        TDataObjectReference dataObjectReferenceJaxb = (TDataObjectReference) ((TCatchEvent) flowNodeJaxb)
            .getDataOutputAssociation().get(0).getTargetRef();
        TDataObject dataObjectJaxb = (TDataObject) dataObjectReferenceJaxb
            .getDataObjectRef();
        objectIds.put(DATAOUTPUTOBJECTID, dataObjectJaxb.getId());
      }
      return objectIds;

    // node is throwing event
    } else if (flowNodeJaxb.getClass().getSuperclass()
        .equals(TThrowEvent.class)) {

      // get data object id associated to this node (if any)
      if (((TThrowEvent) flowNodeJaxb).getDataInputAssociation().size() > 0) {
        // TODO: only one data object supported, see redmine #96 (minor
        // task)
        TDataObjectReference dataObjectReferenceJaxb = (TDataObjectReference) ((TThrowEvent) flowNodeJaxb)
            .getDataInputAssociation().get(0).getTargetRef();
        TDataObject dataObjectJaxb = (TDataObject) dataObjectReferenceJaxb
            .getDataObjectRef();
        objectIds.put(DATAINPUTOBJECTID, dataObjectJaxb.getId());
      }
      return objectIds;

    // node is a task
    } else if (flowNodeJaxb.getClass().getSuperclass().equals(TTask.class)) {

      // get data object id associated to this node (if any)
      if (((TTask) flowNodeJaxb).getDataInputAssociation().size() > 0
          || ((TTask) flowNodeJaxb).getDataOutputAssociation().size() > 0) {
        // TODO: only one data object supported, see redmine #96 (minor
        // task)

        // every task must be handled in its special way
        if (flowNodeJaxb.getClass().equals(TReceiveTask.class)) {
          TDataObjectReference dataObjectReferenceJaxb = (TDataObjectReference) ((TReceiveTask) flowNodeJaxb)
              .getDataOutputAssociation().get(0).getTargetRef();
          TDataObject dataObjectJaxb = (TDataObject) dataObjectReferenceJaxb
              .getDataObjectRef();
          objectIds.put(DATAOUTPUTOBJECTID, dataObjectJaxb.getId());

        } else if (flowNodeJaxb.getClass().equals(TSendTask.class)) {
          TDataObjectReference dataObjectReferenceJaxb = (TDataObjectReference) ((TSendTask) flowNodeJaxb)
              .getDataInputAssociation().get(0).getTargetRef();
          TDataObject dataObjectJaxb = (TDataObject) dataObjectReferenceJaxb
              .getDataObjectRef();
          objectIds.put(DATAINPUTOBJECTID, dataObjectJaxb.getId());
        }

        if (flowNodeJaxb.getClass().equals(TServiceTask.class)) {
          TDataObjectReference dataObjectReferenceJaxb = (TDataObjectReference) ((TServiceTask) flowNodeJaxb)
              .getDataOutputAssociation().get(0).getTargetRef();
          TDataObject dataObjectJaxb = (TDataObject) dataObjectReferenceJaxb
              .getDataObjectRef();
          objectIds.put(DATAOUTPUTOBJECTID, dataObjectJaxb.getId());

          dataObjectReferenceJaxb = (TDataObjectReference) ((TServiceTask) flowNodeJaxb)
              .getDataInputAssociation().get(0).getTargetRef();
          dataObjectJaxb = (TDataObject) dataObjectReferenceJaxb
              .getDataObjectRef();
          objectIds.put(DATAINPUTOBJECTID, dataObjectJaxb.getId());
        }
      }
      return objectIds;

    // if type is not implemented yet return empty map
View Full Code Here

TOP

Related Classes of com.catify.processengine.core.processdefinition.jaxb.TDataObject

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.