You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Dynamics自定义工作流输出参数在流程设计器中不显示

Ellucian(基于MS Dynamics)自定义工作流输出参数在流程设计器中不显示

我在高校担任CRM开发人员,使用基于MS Dynamics的高等教育CRM系统Ellucian。测试自定义工作流时遇到问题:代码中明确定义了字符串类型的输出参数,但注册完成后,输入参数在设计器中正常显示,将该自定义工作流作为流程第二步调用时,输出参数却不显示。

自定义工作流代码

using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Xrm.Sdk.Workflow;
using System;
using System.Activities;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WheatonPluginDelta.Activities
{
    public class AppointmentPopulateSpouse1 : CodeActivity
    {
        [RequiredArgument]
        [Input("Person")]
        [ReferenceTarget("contact")]
         public InArgument<EntityReference> PersonRef { get; set; }

        [RequiredArgument]
        [Input("Appointment")]
        [ReferenceTarget("appointment")]
        public InArgument<EntityReference> AppointmentRef { get; set; }

        [Output("output string")]
        public OutArgument<string> MyOutput { get; set; }

        protected override void Execute(CodeActivityContext executionContext)
        {
            ITracingService tracingService = executionContext.GetExtension<ITracingService>();
            IWorkflowContext workflowContext = executionContext.GetExtension<IWorkflowContext>();
            IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
            IOrganizationService orgService = serviceFactory.CreateOrganizationService(workflowContext.UserId);

            EntityReference personRef = PersonRef.Get(executionContext);
            EntityReference appointmentRef = AppointmentRef.Get(executionContext);

            var appointment = new Entity("appointment", appointmentRef.Id);

            var spouse = orgService.Retrieve("contact", personRef.Id, new ColumnSet("spousesname"));

            if (spouse["spousesname"] != null)
            {
                MyOutput.Set(executionContext, spouse["spousesname"]);
            }
            else
            {
                MyOutput.Set(executionContext, "no spouse found");
            }
        }
    }
}

问题细节

  • 工作流注册完成后,输入参数在设计器中正常展示
  • 将该工作流添加为流程的第二步时,界面仅显示输入参数,无输出参数选项

恳请各位提供排查思路或解决方法。

内容的提问来源于stack exchange,提问作者yhwang

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.10 14:30:44