Esempio n. 1
0
 public static object WAPActivityExecute(int ipriority, string sourceName, string activityName, FieldCollection fc)
 {
     var wapdataObject = new WAPDataObject { fc };
     return WAPActivityExecute(5, sourceName, activityName, wapdataObject);
 }
Esempio n. 2
0
        public static object WAPActivityExecute(int ipriority, string sourceName, string activityName, WAPDataObject wapMessage)
        {
            var activityContract = GetActivityContract(activityName);
            if (activityContract != null)
            {
                var processMessage = ProcessMessage.BuildProcessMsg(ipriority, sourceName, activityContract.OperatorName,
                    activityName, wapMessage);

                var objPara = new object[1];

                var receiver = activityContract.OperatorName;
                var methodName = activityContract.MethodName;

                objPara[0] = processMessage;
                return ExecuteActivity(receiver, methodName, objPara);
            }
            else
            {
                return null;
            }
        }
Esempio n. 3
0
 public ProcessMessage()
 {
     DataObject = new WAPDataObject();
 }
Esempio n. 4
0
 void ICustomerSerializable.LoadObjectFromSerializableString(eCustomerSerializableType type, string serializableString)
 {
     var msg = serializableString.Split(new[] { CustomerSerializableProvider.ProcessMessageSplitString }, StringSplitOptions.RemoveEmptyEntries);
     GUID = msg[0];
     ProcessID = msg[1];
     ProcessType = msg[2];
     Source = msg[3];
     Destination = msg[4];
     int.TryParse(msg[5], out priority);
     ProcessVertexID = msg[6];
     ActivityContractString = msg[7];
     Enum.TryParse(msg[8], out _status);
     if (msg.Length > 9)
     {
         var dataObj = msg[9];
         var wdo = new WAPDataObject();
         ((ICustomerSerializable)wdo).LoadObjectFromSerializableString(type, dataObj);
         DataObject = wdo;
     }
 }
Esempio n. 5
0
        public static ProcessMessage BuildProcessMsgByFC(string source, string destination, string processID, string processType, string activityUFOID, FieldCollection fieldCollection)
        {
            var processMessage = new ProcessMessage
            {
                GUID = Guid.NewGuid().ToString(),
                Priority = 5,
                Source = source,
                Destination = destination,
                ProcessID = processID,
                ProcessType = processType,
                ActivityContractString = activityUFOID
            };

            var wdo = new WAPDataObject { fieldCollection };

            processMessage.DataObject = wdo;
            processMessage.Status = eProcessMsgStatus.Created;

            return processMessage;
        }
Esempio n. 6
0
        public static ProcessMessage BuildProcessMsg(int priority, string source, string destination, string activityUFOID, string processID, string processType, WAPDataObject dataObject)
        {
            var processMessage = new ProcessMessage
            {
                GUID = Guid.NewGuid().ToString(),
                Priority = priority,
                Source = source,
                Destination = destination,
                ProcessID = processID,
                ProcessType = processType,
                ActivityContractString = activityUFOID,
                DataObject = dataObject,
                Status = eProcessMsgStatus.Created
            };

            return processMessage;
        }