آموزش Workflow – آموزش کار با آرگومان خروجی در Workflow

آموزش Workflow – آموزش کار با آرگومان خروجی در Workflow

با سلام و عرض ادب. در خدمت دوستان عزیز هستیم با آموزش Workflow – آموزش کار با آرگومان خروجی در Workflow از وب سایت آموزش برنامه نویسی سورس باران. در این دوره، آموزش Workflow در ۴۶ جلسه بصورت متنی به شما آموزش داده خواهد شد. در این جلسه قصد داریم سیستم گردش فرمی ایجاد کنیم که هنگام initialize شدن چند آرگومان را بپذیرد. در WF5 با استفاده از InArgument ها می توانیم داده ها را داخل یک اکتیویتی استفاده نماییم.لطفا با ما همراه باشید…

این دوره جهت حفظ حقوق نویسنده از سایت حذف شده، مطالب جدیدتری بزودی در سایت قرار میگیرد

آموزش کار با آرگومان خروجی در Workflow

Greetings and admirable wisdom. We are in the service of our dear friends by working with Workflow Training - Working with Output Argument in Workflow from the Source of Rainwriting Learning Web site. In this course, Workflow training will be provided to you in 46 sessions. In this session, we are going to create a circular flow system that accepts multiple arguments when initializing. In WF5, using InArguments, we can use data in an activity. Please come along with us ...

Work with the output argument in Workflow

The useOutArgument workflow project includes the following four steps:

    Create a Project Workflow Console Application
    Create Workflow and Define Output Arguments
    Write C # Codes and set the output argument (out).
    Run Workflow

 
Add a new project from Workflow Console Application

In the Solution Explorer panel, right-click on the Solution Chapter01 and select the ADD option under the New Project menu.

In the Add New Project window, select the workflow option, and then select Workflow Console Application from the right side of the window. Now set the Name field to the value of UseOutArgument and finally click on the OK button.

 
Create Workflow and Define Output Arguments

Open the Workflow1.xaml file from the Solution Explorerr panel and define Workflow as follows

    From the ToolBox panel, select the Sequence activity and drag the workflow into the workflow.
    At the bottom of the Workflow Design page, select the Arguments tab and click on the Create Argument, now create an argument like String and OutArgument called OutMessage.
    From the ToolBox panel, select the WriteLine activity and drag and drop into the Sequence activity, and then set the text value to "Start ...". Now put another WriteLine activity in the Sequence and set the Text value to "End".
    From the ToolBox panel, select the Assign activity and drag the workflow drawing board and place it between the two WriteLine actions. Next, set the box to the left with the name of the argument defined above, OutMessage, and set the box to the right with the value "This is a message from workflow".

 
Write C # Codes and set the output argument (out).

But then open the Program.cs file and change the following subkeys.

using system;
using system.Linq;
using System.Activities;
using System.Activities.Statements;
using System.Collections.Generic;

namespace UseOutArgument
{

    class program
    {
        static void Main (string [] args)
        {
            IDictionary & lt; string; object & gt; output =
            WorkflowInvoker.Invoke (new Workflow1 ());
            Console.WriteLine (output [OutMessage]);
            Console.ReadLine ();
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19th
20

using system;
using system.Linq;
using System.Activities;
using System.Activities.Statements;
using System.Collections.Generic;
 
namespace UseOutArgument
{
 
    class program
    {
        static void Main (string [] args)
        {
            IDictionary & lt; string; object & gt; output =
            WorkflowInvoker.Invoke (new Workflow1 ());
            Console.WriteLine (output [OutMessage]);
            Console.ReadLine ();
        }
    }
}

 
Run Workflow

Set the UseOutArgument project as a StartUp project and press Ctrl + F5 shortcut to run Workflow. This will save the Workflow and will display the result without debugging. The result is executed in the Windows console and the following statement is printed

 
How does the workflow system work?

Please refer to the Program.cs file code below
IDictionary <string, object> output = WorkflowInvoker.Invoke (new Workflow1 ());
Console.WriteLine (output [OutMessage]);
1
2

IDictionary <string, object> output = WorkflowInvoker.Invoke (new Workflow1 ());
Console.WriteLine (output [OutMessage]);

As you noticed, OutMessage is the name of the argument we defined in Workflow1.xaml. Note that the value returned by the WorkflowInvoder.Invoke method is an object of the type IDictionary.

tip!!! There is a third type of argument in the Workflow named InOutArgument, which is used as an input / output. In most cases, instead of the InArgument and OutArgument arguments, we would prefer to use the InOutArgument type. However, there are differences between them, for example, the InOutArgument argument can not be set to a String value, but can be done in the InArgument argument.

be successful and victorious

اجزای گردش کار:

  • مقدار ورودی: اطلاعات و مقادیری را شامل می شود که مورد نیاز یک مرحله از گزارش کار می باشد.
  • قوانین تغییر: یک سری آیین نامه ها یا به طور بهتر الگوریتم هایی هستند که توسط نقش های انسانی ، سیستمی و یا ترکیبی از هر دو انجام می شود.
  • مقدار خروجی: تمام مقادیر و اطلاعاتی هستند که توسط هر مرحله تولید شده و به عنوان ورودی وارد مرحله بعدی می شوند.

منابع : Introduction-to-workflows

bpm-tutorial/workflow-tutorial

Workflow_Fundamentals

what-is-workflow

به این مطلب امتیاز دهید post

راستی! برای دریافت مطالب جدید در کانال تلگرام یا پیج اینستاگرام سورس باران عضو شوید.

پکیج آموزش صفر تا صد طراحی فروشگاه اینترنتی بدون کدنویسی

دسته بندی موضوعات

آخرین محصولات فروشگاه

مشاهده همه

نظرات

بازخوردهای خود را برای ما ارسال کنید

این سایت از اکیسمت برای کاهش هرزنامه استفاده می کند. بیاموزید که چگونه اطلاعات دیدگاه های شما پردازش می‌شوند.