logo

Working with a project plan in a process task

ELMA provides features for previewing and editing a project plan from a process task. To make these features available, in ELMA Designer open the Context tab of the required process and create variables of the Project (Project) and Project Plan (Object) type (fig. 1). 

 Fig. 1. ELMA Designer. Process page. Context tab

After adding variables to the process context, return to the Graphic Model tab and open the settings of the user task, in which you need to display the created variables. In the settings window, switch to the Form (context) tab and select Form Builder form type. After that, click Create New Form (fig. 2).

Fig. 2. ELMA Designer. User task settings. Form (context) tab. Creating a new form

In the opened dialog box, enter the form name and click OK; the form builder will open (fig. 3).

Add the variables of the Project (Project) and Project Plan (Object) types to the task form, so that editing the project plan was available on the user task form in ELMA Web Application.

Fig. 3. ELMA Designer. A new user task form in the Form Builder

Next, open the settings of the Project form element by double-clicking on it or by opening its context menu and selecting Settings. In the opened window, switch to the Additional tab and click Add Script (fig. 4).

Fig. 4. ELMA Designer. Settings of the Project element. Additional tab

After clicking Add Script, you will see a dialog box with one required field - Script Name(fig. 5).

Fig. 5. ELMA Designer. Dialog box for adding a script

Having specified a script name, click OK. After that, the script will be displayed in the Handler of onchange event field on the Additional Tab (fig. 6).

Fig. 6. ELMA Designer. A script on the Additional tab

To edit the script click Go To.

In the editor, add the following namespaces:

using EleWise.ELMA.Projects.Extensions;
using EleWise.ELMA.Projects.Models;

Script text:

public virtual void code (Context context, EleWise.ELMA.Model.Views.FormViewBuilder<Context> form)

Add this line: 

context.ProjectPlan = (ProjectPlan)(((IProject)context.Project).Plan());

To save the script in the script editor, click Save in the toolbar.

After you have edited the script, go back to the user task form settings (fig. 3) and open the settings of the Project Plan element.

In the opened window, on the General tab, you can check the Read Only box (fig. 7).

Fig. 7. ELMA Designer. Project Plan element settings. General tab

If you check this box, after saving and publishing the process the task form in Web Application will display the current project plan version as a hyperlink and plan icon in the Project Plan field (fig. 8).

Fig. 8. ELMA Web Application. Process task form

When you click on this hyperlink, a dialog box with a project plan is shown (fig. 9), which features project plan tasksthe Gantt chartand the project plan toolbar.

Fig. 9. ELMA Web Application. Project plan window

You can also open the project plan page in a separate browser tab by clicking , next to the project plan version name.

If you have not selected the Read Only checkbox (fig. 7), then next to the plan version name you will see the icon. Clicking on this icon opens the project plan editing page in a new browser tab. The project plan editing page will open only if the user has the required access permissions.

Note, that a project plan version will be displayed in the Project Plan field only after you select a project in the Project field (fig. 10).

Fig. 10. Process task form