Overview:
This article will show you how to create a custom workflow container. You may find yourself in a situation where you need to run a workflow that displays in a non standard region, leaving the modal region, or the results panel free. In that case, you can create a custom workflow container, which runs in one of the other viewer regions. Note that while this works, your workflow activities may not be styled for the regions that you are trying to run them in. As such, you may need to write some custom CSS or do some custom development, which is outside the scope of this tutorial.
A list of available viewer regions can be found in Appendix B of the Geocortex Viewer for HTML5 Administrator and Developer guide.
Solution:
Creating the workflow container
- Navigate to your sites viewer configuration folder. Your path may be slightly different, but will look similar to this:
C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\Default\REST Elements\Sites\YourSite\Viewers\YourViewer\VirtualDirectory\Resources\Config\Default
- Make a backup copy of your Desktop.json.js file, and edit the original.
- Navigate to the Workflow Module by searching the file for: "moduleName": "Workflow"
- Scroll down to the Containers element
- The item at the end of the list should look like this:
{ "name": "ModalWindowNoCloseButton", "title": "@language-workflow-title", "regionName": "ModalWindowRegion", "allowClose": false }
- Make a copy of this element, and add a comma to the end. Add a new line, and paste in the copied entry. The section should now look like this:
{ "name": "ModalWindowNoCloseButton", "title": "@language-workflow-title", "regionName": "ModalWindowRegion", "allowClose": false }, { "name": "ModalWindowNoCloseButton", "title": "@language-workflow-title", "regionName": "ModalWindowRegion", "allowClose": false }
- Modify the entry to use the parameters you want. For example:
{ "name": "ModalWindowNoCloseButton", "title": "@language-workflow-title", "regionName": "ModalWindowRegion", "allowClose": false }, { "name": "SuperDuperContainer", "title": "My Custom Container", "regionName": "TopRightMapRegion" }
- Save the file
Using the container in a Workflow
Many workflow activities offer a section for you to specify the workflow container name. In this case, the name parameter we set previously (SuperDuperContainer) will be the name that we use in these activities to specify where the activity should run.
- Create a new workflow.
- Add a DisplayForm Activity.
- Add some buttons and fields.
- Set the Workflow Container Name to "SuperDuperContainer".
- Add the workflow to your site.
- Add a method for invoking the workflow (Like a button, an IWTM entry, or having the workflow run on startup).
- Launch the viewer.
- Launch your workflow.
- In our example, we will see something like this:
Comments
0 comments
Article is closed for comments.