Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
77:process_feedback [2021/07/27 10:37] fnpk77:process_feedback [2024/02/15 00:00] (current) – external edit 127.0.0.1
Line 22: Line 22:
  
         <system-attribute-mappings>         <system-attribute-mappings>
-          <attribute source="elementUrl" target="MyField" targetType="MyField" targetType="MyFieldType" />+          <attribute source="elementUrl" target="MyField" targetType="MyFieldType" />
         </system-attribute-mappings>         </system-attribute-mappings>
  
Line 35: Line 35:
   </feedback-systems>   </feedback-systems>
 </stages-config> </stages-config>
 +
  
 </code> </code>
Line 57: Line 58:
 <code xml> <code xml>
 <property name="propertyKey" value="propertyValue" /> <property name="propertyKey" value="propertyValue" />
 +
  
 </code> </code>
Line 68: Line 70:
 <code xml> <code xml>
 <attribute ident="description" type="text" target="MyDescriptionField" targetType="MyFieldType" /> <attribute ident="description" type="text" target="MyDescriptionField" targetType="MyFieldType" />
 +
  
 </code> </code>
Line 82: Line 85:
 <code xml> <code xml>
 <attribute source="elementUrl" target="MyField" targetType="MyField" targetType="MyFieldType" /> <attribute source="elementUrl" target="MyField" targetType="MyField" targetType="MyFieldType" />
 +
  
 </code> </code>
  
-  * ''source'': Which information from Stages should be taken +  * ''source'': Which information from Stages should be taken. See also picture below. 
-      * ''elementUrl'': Url to element +      * Attributes of current view where the user provides feedback 
-      * ''elementStableUrl'': Url to element with specific version (Since Stages 7.5.1.3+        * ''elementName'': e.g. "Analyze Scope" (Since Stages 7.8) 
-      * ''originElementUrl'': Url to editable element if current element is imported by module import (Since Stages 7.5.1.3+        * ''elementShortname'': e.g. "AS" (Since Stages 7.8
-      * ''originElementStableUrl'': Url to editable element with specific version if current element is imported by module import (Since Stages 7.5.1.3+        * ''elementLabel'': e.g. "AS: Analyze Scope" (Since Stages 7.8
-      * ''elementIdentity'': e.g. _wUV9sBbNHr-aicWx33VsQA (Since Stages 7.5.1.3) +        * ''elementType'': e.g. "Workflow" (Since Stages 7.8
-      * ''processVersionName'': e.g. V1 (Since Stages 7.5.1.3) +        * ''elementIdentity'': e.g. _wUV9sBbNHr-aicWx33VsQA (Since Stages 7.5.1.3) 
-      * ''workspaceName'': e.g. Software Engineering +        * ''elementUrl'': Url to element 
-      * ''workspacePath'': e.g. Company > Software +        * ''elementStableUrl'': Url to element with specific version (Since Stages 7.5.1.3) 
-      * ''workspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.1.3) +        * ''processVersionName'': e.g. V1 (Since Stages 7.5.1.3) 
-      * ''originWorkspaceName'': e.g. Software Engineering (Since Stages 7.5.2.2) +        * ''workspaceName'': e.g. Software Engineering 
-      * ''originWorkspacePath'': e.g. Company > Software (Since Stages 7.5.2.2) +        * ''workspacePath'': e.g. Company > Software 
-      * ''originWorkspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.2.2+        * ''workspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.1.3) 
-      * ''creatorFullname'': e.g. John Doe +        * ''creatorFullname'': e.g. John Doe 
-      * ''creatorUsername'': e.g. jdoe +        * ''creatorUsername'': e.g. jdoe 
-      * ''creatorEmail'': e.g. jdoe@example.com (Since Stages 7.5.2.2)+        * ''creatorEmail'': e.g. jdoe@example.com (Since Stages 7.5.2.2) 
 +      * If process element was imported by module import, then the following attributes belongs to the imported source module. Otherwise or if process element is overwritten the attributes belongs to current view (Since Stages 7.9) 
 +        * ''sourceModuleElementUrl'': Url to element if current element is imported by module import 
 +        * ''sourceModuleElementStableUrl'': Url to element with specific version if current element is imported by module import 
 +        * ''sourceModuleWorkspaceName'': e.g. Software Engineering 
 +        * ''sourceModuleWorkspacePath'': e.gCompany > Software 
 +        * ''sourceModuleWorkspaceFullPath'': e.g. Company > Software > Software Engineering 
 +      * If process element was imported by multiple module imports, then the following attributes belongs to the module where the process element was created originally and can be edited. Otherwise or if process element is overwritten the attributes belongs to current view 
 +        * ''originElementUrl'': Url to editable element if current element is imported by module import (Since Stages 7.5.1.3
 +        * ''originElementStableUrl'': Url to editable element with specific version if current element is imported by module import (Since Stages 7.5.1.3) 
 +        * ''originWorkspaceName'': e.g. Software Engineering (Since Stages 7.5.2.2) 
 +        * ''originWorkspacePath'': e.g. Company > Software (Since Stages 7.5.2.2) 
 +        * ''originWorkspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.2.2)
   * ''target''  and ''targetType'': Defines feedback system specific configuration   * ''target''  and ''targetType'': Defines feedback system specific configuration
 +[[https://doc.stagesasaservice.com/lib/exe/detail.php?id=77:process_feedback&media=77:feedback-source.png|{{  :77:feedback-source.png?400  }}]]
 +
 === Custom Attribute Mappings === === Custom Attribute Mappings ===
  
Line 110: Line 128:
 <code xml> <code xml>
 <attribute value="Stages" target="MySourceSystemField" targetType="MyFieldType" /> <attribute value="Stages" target="MySourceSystemField" targetType="MyFieldType" />
 +
  
 </code> </code>
Line 120: Line 139:
  
 <code javascript> <code javascript>
-var user = currentElement.getProperty("LastChangeUser"); +if(currentElement) { 
-result.mappings.put("lastChangedBy", user); // Add script-attribute-mapping 'lastChangedBy'+    var user = currentElement.getProperty("LastChangeUser"); 
 +    result.mappings.put("lastChangedBy", user); // Add script-attribute-mapping 'lastChangedBy' 
 +}
 result.properties.put("project", "Demo"); // Override property 'project' result.properties.put("project", "Demo"); // Override property 'project'
 +
  
 </code> </code>
Line 143: Line 165:
   </feedback-systems>   </feedback-systems>
 </stages-config> </stages-config>
 +
  
 </code> </code>
  
-The script can access the process element of the feedback ''currentElement''.+The script can access to several information of the process: 
 + 
 +  * Current process element''currentElement''  (in case of process start page it is null) 
 +  * Current user: ''currentUser'' 
 +  * Logger: ''log'' 
 +  * Pkit: ''pkit'' 
 +      * Current version of process: ''pkit.getCurrentProcess()'' 
 +      * Current workspace: ''pkit.getCurrentProject()'' 
 +      * … 
 + 
 +The script cannot access the information that the user entered into an Attribute.
  
 All results have to be stored to the predefined ''result''  variable. All results have to be stored to the predefined ''result''  variable.
Line 152: Line 185:
   * Values in ''result.mappings''  are configurable in the xml via ''script-attribute-mappings''   * Values in ''result.mappings''  are configurable in the xml via ''script-attribute-mappings''
   * Values in ''result.properties''  will add or override the ''properties''  of the xml file   * Values in ''result.properties''  will add or override the ''properties''  of the xml file
 +
  
 ==== Stages metamodel ==== ==== Stages metamodel ====
  
-The feedback widget must be added to your Stages metamodel. The XML-Element is:+The feedback widget must be added to your Stages metamodel. We suggest to consult your Product Consultant for this step. 
 + 
 +The XML-Element is:
  
 <code xml> <code xml>
Line 182: Line 218:
  
 </code> </code>
 +
  
 ==== Stages language properties ==== ==== Stages language properties ====