如何在 ExternalAction 的代码效果中创建接触器,我有这个代码
[ExternalAction(typeof(Service), "SendEmail")]
我想在成功评估时发送电子邮件但没有在 SendEmail 中编写发送代码,我想使用调用接口发送它,像这样
private readonly IEmailService email;
public Service(IEmailService emailService)
{
email = emailService;
}
[Action("Send Email", "Send Email to Someone")]
public void SendEmail(Rule Rule, [Parameter(ValueInputType.User, Description = "Output message", DataSourceName = "UserList")] int userId)
{
email.sene(userId);
}