Support > Repository > Workflow > Perform workflow definition for model
ja | en

I will explain how to set workflow in Wagby definition file. I will prepare a "Yearly Application" model as a sample.

We will prepare the "Yearly Application" model shown in Fig. 1 here.

Figure 1 Annual leave model
item name Item ID Type Search List
Application ID appid Numerical value
Applicant applicant Item reference of other models
date leavedate Date/Time
Flow state flowstatus String (※ calculation formula)
the reason reason String


We refer to the logon account model (juser) provided by Wagby as standard.(Figure 2)

Figure 2 Reference juser in list box

In addition, the initial value at the registration screen display is "logon ID".(Figure 3)
This will select the currently logged on account as the initial value of the list box.

Figure 3 Setting the initial value when displaying the registration screen


To automatically set today's date when registering screen, use function TODAY.(Figure 4)

Fig. 4 Using function TODAY

Flow state

By using the function FLOWSTATUS, you can know the flow state (application, approval etc).(FIG. 5)
For details on how to set the format, see "Function> Workflow>FLOWSTATUSPlease read.

FLOWSTATUS("leave", TOSTR(${appid}))
Figure 5 Using function FLOWSTATUS
When specifying the item to which the FLOWSTATUS function is applied as a search condition, special setting is necessary.Detail is"Search in model workflow statePlease read.

the reason

The type of the input item is a text area.(FIG. 6)

Figure 6 Setting the type of input item

Apply workflow

Apply workflow to this model.In the "Workflow" setting column prepared for "Other" in the "Screen" tab, give the "Enable workflow" check.(FIG. 7)

Figure 7 Enabling Workflow

When the setting is completed, build it.

Launch the Web application you built.Log on as a system administrator and prepare three groups (General Affairs Department, Sales Department, Technical Development Department) shown in Figure 8.

Fig. 8 Preparing a demo group
The following tests can not be tried with the trial kit.This is to add account processing.Please use development kit.

We have three accounts (arakaki, miyagi, murata) belonging to the Technology Development Department group.(Figure 9) The principal adds "common process", "password change", "general user" plus "flow state viewing".
We will explain these as demo data on the following pages.

Figure 9 Preparing account for demo
Figure 10 Principal of Demo Account