Example #1
0
        public async Task <Dictionary <string, object> > Calculate(RealWorkfolwActivity activity, RealWorkfolwContext context)
        {
            /*var inputParameters = await GetInputParameters(activity);
             * Dictionary<string, object> inputObjects = new Dictionary<string, object>();
             * foreach(var inputItem in inputParameters)
             * {
             *  inputObjects.Add(inputItem.Key, await _realWorkfolwActivityParameterHandle.Execute(inputItem.Value, context));
             * }
             */
            RealWorkfolwActivityDescription activityDescription = null;

            if (!activity.Extensions.TryGetValue("description", out object objActivityDescription))
            {
                activityDescription = await _realWorkfolwActivityResolve.Execute(activity.Configuration);

                lock (activity)
                {
                    activity.Extensions["description"] = activityDescription;
                }
            }
            else
            {
                activityDescription = (RealWorkfolwActivityDescription)objActivityDescription;
            }

            var outputObjects = await _realWorkfolwActivityCalculate.Execute(activityDescription, context, new Dictionary <string, object>());

            //context.ActivityOutputParameters[activity.ID.ToString()] = outputObjects;

            return(outputObjects);
        }
Example #2
0
 public async Task <Dictionary <string, RealWorkfolwActivityParameter> > GetOutputParameters(RealWorkfolwActivity activity)
 {
     return(await _activityConfigurationService.ResolveActivityOutputParameters(activity.Configuration));
 }