1. 程式人生 > 其它 >Orchard core 用工作流建立內容專案(ContentItem)

Orchard core 用工作流建立內容專案(ContentItem)

技術標籤:C#Orchard Core

參考文件中的程式碼:https://docs.orchardcore.net/en/dev/docs/reference/modules/Workflows/

注意:可轉發此部落格,但必須表示原作者。

1.建立一個模組。

2.在模組中建立幾個資料夾同上面圖中的資料夾一樣。

3.在Activities資料夾中建立CreateEvaluationTask.cs:

using Microsoft.AspNetCore.Mvc.Localization;
using Microsoft.Extensions.Localization;
using Onon.Workflow.Notify;
using OrchardCore.ContentFields.Fields;
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement.Records;
using OrchardCore.DisplayManagement.Notify;
using OrchardCore.Lists.Models;
using OrchardCore.Media.Fields;
using OrchardCore.Workflows.Abstractions.Models;
using OrchardCore.Workflows.Activities;
using OrchardCore.Workflows.Models;
using OrchardCore.Workflows.Services;
using Syst