CommonSettings

From GeoMedia Smart Client
Jump to: navigation, search
Settings WorkflowSetting FormSetting CommonSetting





Folder Structure / Important Files

The Workflow-Engine is in your installation directory (for example, C:\Program Files\Intergraph\GeoMedia SmartClient\Program\Workflows) in the subdirectory Workflows (this directory has to be mapped into an application in the Internet Information Service (IIS)). The following subdirectories can be found in the directory Workflows:


Folder structure:

Folder structure


Short description of the folder structure:

Directory Description
App_GlobalResources Contains Microsoft ResX Schema Files used for internationalization of the Workflow-Labels.
bin Contains the DLL Files of the WorkflowEngine.
Content Contains scripts (Scripts), styles (Css) and themes (workflow-themes) included in the software.
Custom Contains scripts (Scripts) and styles (Css) which are generated by the user himself.
FormSettings contains the XML-FormSettings-File of the workflow.
Log contains the log-file Workflow.log of the application.
Views contains default (and user customizable) views used for presentation of the workflow.
WorkflowSettings contains the XML-WorkflowSettings-File of the workflow.
xsd Contains all xsd-files which are needed for the WorkflowEngine.


Important files: In addition to the directories described above, the main folder Workflows also holds these important files:

File Description
Web.config contains the configuration of the workflow stored as XML-structure:
  • config.section
  • dotless
  • appsettings
  • workflowAuthentication
  • log4net
  • runtime
  • system.web
  • system.webServer
  • system.serviceModel
  • unity
Workflow.config contains the configuration of the workflow stored as XML-structure:
  • appSettings
  • connectionString
  • configSection
  • unity
*.wepf If the Workflow-Editor is used for the generation/validation of HTML-workflows, the *.wepf - File (WorkflowEditorProjectFile) has to be stored in the "Root"-Folder (Workflow-Engine).



Pfeil new.png To the top Pfeil new.png

Variables & Functions

There are several ways to integrate dynamic information into your workflow. For example, you can use the current selection from the map, or you can reference to an additional FormField.

Types of Variables:

Type Description
Session The session variables contain information about the selected elements (for example, selection in the map or a selected element of the last WorkflowNode).
Syntax: {SESSION.TABLENAME.PRIMARY_KEY_COLUMN}


{SESSION.EDIT_AREA.ID}


Here you will find all Session parameters, which are possible.

Form Using dependency variables, you can get access inside the Form-definition in the FormSettings-XML to the current value of other FormFields.
Syntax: {FORM.FORMFIELDNAME}


{FORM.LASTNAME}
Requestcontext Additional "Url"-Parameters not covered by Workflow-variables can be set by:
 Syntax:  {REQUESTCONTEXT.MYURLPARAMETER}
User {USER}-Variables are only available if authorization for the workflow is set.


{USER.Identifier}
{USER.Name}
{USER.Description}
{USER.Email}
Map {MAPS}-Variables are only available if workflow is used in GeoMedia Smart Client and are written in the {SESSION}- variable.
Syntax: {SESSION.MAP.ActiveFeature}
  • {MAP.ActiveFeature}: The active feature.
  • {MAP.MapScale}: The scale of the map.
  • {MAP.MapBounds}: The boundaries of the map.
  • {MAP.MapCenter}: The center of the map.
  • {MAP.MapSelection}: The selected features.

If MAP.MapSelection = 1 then the form is filled automatically.

{SESSION.MAP.MapScale}



Pfeil new.png To the top Pfeil new.png

SESSION - Variables

The "default" navigation-concept in a workflow can be regarded as follows: Workflow-Node without a Controller placed on this node → Workflow-Node with List-Controller and Form → Workflow-Node with Form-Controller and Form

...
<WorkflowNode id="1" label="Administration"> 
    <WorkflowNode id="10" label="Car-Overview" controller="List" form="CAR">
        <WorkflowNode id="100" label="Edit Car" controller="Form" form="CAR" follownode="10">
        </WorkflowNode>
    </WorkflowNode>
</WorkflowNode>
...



When users reach the List-Controller "Car-Overview", they select a list-element (which matches a row in the database) that is forwarded to the Form-Controller. Now the Session-Variable contains information about the Primary Key (for example, named "ID") of the selected car. The Session-Variables are stored in the SEC_SESSION table of the used Database/Schema together with the Session-ID of the user.

The session variable of the example above now can be referenced via

{SESSION.CAR.ID}

in both, the FormSettings.xml:

...
<FormField name="OWNER" label="Car Owner:" type="textfield" datatype="string" 
persisted="false" required="false"
defaultvalue="SQL[SELECT NAME FROM PERSON WHERE ID=(SELECT PERSON_ID FROM PERSON_CAR WHERE CAR_ID={SESSION.CAR.ID})]"/>
...



... and the WorkflowSettings.xml:

...
<WorkflowNode id="100" label="Edit Car" controller="Form" form="CAR">
  <WorkflowTrigger name="DeleteCarReferenceTrigger" type="DbTrigger" method="action" condition="true">
    <Param name="Sql" value="SQL[DELETE FROM PERSON_CAR WHERE CAR_ID={SESSION.CAR.ID}]"/>
  </WorkflowTrigger>
</WorkflowNode>                
...



If a Variable-Value other than the Primary-Key-Value is needed in the workflow, any other necessary FormField-value can be stored in the SEC_SESSION table by defining a saveinsession="true/false" attribute at the FormField-Element. If the saveinsession-variable is set true it always set tableName.columnName:

...
<FormField name="PHONENUMBER" label="Telephone:" type="textfield" datatype="string" saveinsession="CONTACT.PHONENUMBER"/>
...



As soon as the belonging table is stored (action="save"), the FormField marked with saveinsession will be persisted in the SEC_SESSION table and can be called later through {SESSION.TABLE_NAME.COLUMN_NAME}.

...
<FormField name="PHONENUMBER_NEW" label="Telephone:" type="textfield" datatype="string" defaultvalue="{SESSION.CONTACT.PHONENUMBER}"/>
...



Set session variables in the SEC_SESSION table at a Workflow-Node:

If the user wants to save session variables at Workflow-Node-Level (for example, before the Form-Controller is opened ), this is done in the workflow inside a WorkflowTrigger.

...
<WorkflowNode controller="Form" form="PERSON" id="22" label="Enter new Person" emptyform="true" follownode="2">
  <WorkflowTrigger name="SetKeyTrigger" type="SessionTrigger" method="before">
    <Param name="Keys" value="ACTUAL_PERSON.ID={SESSION.UNID.CURENT}{SESSION.PERS.ID}"/>
  </WorkflowTrigger>                 
</WorkflowNode>                
...



Evaluation of a SESSION-Variable:

The SESSION[KeyExists(...)] is used to find out if a variable has been set in the SEC_SESSION table. The result of the query is a boolean value (true/false).


Syntax: SESSION[KeyExists(NAME_OF_THE_KEY)]

Example:

<WorkflowNode id="4" ... condition="SESSION[KeyExists(PATIENT.GUID)]" >



DEPENDENCY - Variables: Using dependency variables, you can get access inside the form definition in the FormSettings-XML to the current value of other FormFields.

Example: Create a list of themes depending on the selected project.

 ...
 <FormField name="PROJECT" label="Project:" type="combobox" datatype="string" 
  lov="SQL[SELECT NAME FROM PROJECT ORDER BY NAME]"/>
 <FormField name="THEME" label="Theme:" type="combobox" datatype="string" 
  lov="SQL[SELECT NAME FROM THEME WHERE PROJECT_ID={FORM.PROJECT}]"/>
 ...



ESCAPE-Characters:

For the usage in the Workflow-XML, the most important escape-characters are listed below:

Character Escape-Character
< &lt;
> &gt;
& &amp;
" &quot;



Language: English