Diagram in Expression Language: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
(Created page with " ==Diagram Properties== Datatables are stored to QPR ProcessAnalyzer database as database tables. Each datatable belongs to a project. {| class="wikitable" !'''Property''' ! '''Description''' |- ||ColumnNames (String*) ||Returns Datatable column names as a string array in the order they are in the DataTable. |- ||ColumnMappings (Dictionary) ||Returns column mappings configured for this Datatable. Returned data is a dictionary, where keys are mapping names (...")
 
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
In QPR ProcessAnalyzer, '''diagram''' can be used to create user-defined business process and architecture designs. The diagram is a drawing canvas where elements can be added from a tool palette and relation between them defined. Each diagram belongs to the model in QPR ProcessAnalyzer and there can be several diagrams in each model.


==Diagram Properties==
==Diagram properties==
Datatables are stored to QPR ProcessAnalyzer database as database tables. Each datatable belongs to a [[#Project|project]].
Diagram objects in the expression language have the following properties:
{| class="wikitable"
!'''Property'''
! '''Description'''
|-
||Content (Dictionary)
||Returns content of the diagram as dictionary.
|-
||CreatedBy (User)
||Returns user who created the diagram.
|-
||CreatedDate (Datetime)
||Returns diagram creation date.
|-
||Description (String)
||Returns description of the diagram.
|-
||Id (Integer)
||Returns id of the diagram.
|-
||LastModifiedBy
||Returns user who last modified the diagram.
|-
||LastModifiedDate (DateTime)
||Returns diagram last modification date.
|-
||Model (Model)
||Returns model object where the diagram is located.
|-
||ModelId (Integer)
||Returns id of the model where the diagram is located.
|-
||Name (String)
||Returns name of the diagram.
|}


== Diagram functions ==
Diagram objects in the expression language have the functions described below. To create new diagrams, use function [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Model|Model.CreateDiagram()]], and to list existing diagram, use property [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Model|Model.Diagrams]].
{| class="wikitable"
{| class="wikitable"
!'''Property'''
!'''Function'''
!'''Parameters'''
! '''Description'''
! '''Description'''
|-
|-
||ColumnNames (String*)
||DeletePermanently
||Returns Datatable column names as a string array in the order they are in the DataTable.
||
||Deletes the diagram permanently.
|-
|-
||ColumnMappings (Dictionary)
||Modify
||Returns column mappings configured for this Datatable. Returned data is a dictionary, where keys are mapping names (''CaseId'', ''EventType'', ''Timestamp'') and value is the column name. The ColumnMappings property returns null if column mappings have not been defined for the Datatable.
||Dictionary of changes properties
||Changes the provided properties of the diagram. Parameter is a dictionary containing the properties to be updated. Supported properties are:
* '''ModelId''' (Integer): Model id (to move the diagram into different model).
* '''Name''' (String): Diagram name.
* '''Description''' (String): Diagram description.
* '''Content''' (Dictionary): Diagram content as dictionary.
 
Example:
Example:
<pre>
<pre>
let caseIdColumnName = DatatableById(123).ColumnMappings("CaseId");
ModelById(1)
  .Modify(#{
    "ModelId": 2,
    "Name": "New diagram name",
    "Content": #{ ... },
  });
</pre>
</pre>
|}
Function to get diagram by diagram id:
{| class="wikitable"
!'''Function'''
!'''Parameters'''
! '''Description'''
|-
|-
||ColumnTypes (Dictionary*)
||DiagramById
||
* Diagram id (Integer)
||
||
Returns diagram object corresponding to the provided diagram id.
|}
|}

Latest revision as of 12:01, 13 October 2023

In QPR ProcessAnalyzer, diagram can be used to create user-defined business process and architecture designs. The diagram is a drawing canvas where elements can be added from a tool palette and relation between them defined. Each diagram belongs to the model in QPR ProcessAnalyzer and there can be several diagrams in each model.

Diagram properties

Diagram objects in the expression language have the following properties:

Property Description
Content (Dictionary) Returns content of the diagram as dictionary.
CreatedBy (User) Returns user who created the diagram.
CreatedDate (Datetime) Returns diagram creation date.
Description (String) Returns description of the diagram.
Id (Integer) Returns id of the diagram.
LastModifiedBy Returns user who last modified the diagram.
LastModifiedDate (DateTime) Returns diagram last modification date.
Model (Model) Returns model object where the diagram is located.
ModelId (Integer) Returns id of the model where the diagram is located.
Name (String) Returns name of the diagram.

Diagram functions

Diagram objects in the expression language have the functions described below. To create new diagrams, use function Model.CreateDiagram(), and to list existing diagram, use property Model.Diagrams.

Function Parameters Description
DeletePermanently Deletes the diagram permanently.
Modify Dictionary of changes properties Changes the provided properties of the diagram. Parameter is a dictionary containing the properties to be updated. Supported properties are:
  • ModelId (Integer): Model id (to move the diagram into different model).
  • Name (String): Diagram name.
  • Description (String): Diagram description.
  • Content (Dictionary): Diagram content as dictionary.

Example:

ModelById(1)
  .Modify(#{
    "ModelId": 2,
    "Name": "New diagram name",
    "Content": #{ ... },
  });

Function to get diagram by diagram id:

Function Parameters Description
DiagramById
  • Diagram id (Integer)

Returns diagram object corresponding to the provided diagram id.