Adding an Action
Open Bookstore's Module Process Template.mpt file by double-clicking on it. The editor should open:
Open the Outline tile.
Select Bookstore's Book model that you created in the last chapter, which should display an overview for the model in the Module Process Template (MPT) Editor. Click the Permissions tab:
In the Role Type list box under the Permissions section, select ZBKS.SampleRoleType. For both the Read and Write permissions, select the By Dimension check box, and then select the Value Chain option:
This gives every User with Role Type ZBKS.SampleRoleType the ability to read and write all Books in the system. (Strictly speaking, all Books under a single Value Chain, but we have only one Value Chain here.) In a more realistic scenario, you might configure it a bit differently by comparing the User's Enterprise, Org or Site against Enterprises, Orgs and Sites on the Model itself. This topic is covered later in the User's Guide.
Now we're going to add a Create Action for the Book Model, so that we can create instances of our Book. Select the Actions tab inside the MPT Editor.
An "action" is an operation executed on a model that typically ends with writing the model to the database. There are four actions provided by Platform for every model:
PLT.Create
PLT.Update
PLT.InsertOrUpdate
PLT.Delete
This ensures that basic create, update and delete operations are always available to all models for administration purposes. You can also add your own actions that define their own field optionality/requiredness, their own workflows, and their own permissions.
For the purposes of this example, we will add a new action called "Create".
Under the Actions section, click Add. In the dialog that pops up, enter the following information:
Then click OK.
Because you added this action to the ZBKS (Bookstore) module, it will be automatically prefixed with ZBKS. Thus you should be able to see the new ZBKS.Create Action in the Actions list box. In the Action Details section, choose the OPTIONAL default mask. This means that by default, fields are not required to be given, but if given they will be persisted.
Click the Permissions tab, and check the Can access this action check box for ZBKS.SampleRoleType.
Click Save to save the MPT.
Click Submit to submit the MPT to the server. When you see a message that the submission was successful, the MPT is ready for use in NEO.