Esempio n. 1
0
 public ActivityDescriptor()
 {
     Type             = "Activity";
     Category         = "Miscellaneous";
     Traits           = ActivityTraits.Action;
     DisplayName      = "Activity";
     InputProperties  = new ActivityInputDescriptor[0];
     OutputProperties = new ActivityOutputDescriptor[0];
     Outcomes         = new string[0];
 }
Esempio n. 2
0
        private static async Task <object?> GetPropertyValueAsync(IWorkflowBlueprint workflowBlueprint, IActivityBlueprintWrapper activityBlueprintWrapper, ActivityInputDescriptor propertyDescriptor, CancellationToken cancellationToken)
        {
            if (propertyDescriptor.IsDesignerCritical)
            {
                try
                {
                    return(await activityBlueprintWrapper.EvaluatePropertyValueAsync(propertyDescriptor.Name, cancellationToken));
                }
                catch (Exception e)
                {
                    throw new WorkflowException("Failed to evaluate a designer-critical property value. Please make sure that the value does not rely on external context.", e);
                }
            }

            return(workflowBlueprint.GetActivityPropertyRawValue(activityBlueprintWrapper.ActivityBlueprint.Id, propertyDescriptor.Name));
        }