mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-3348] Add default process name pipe (#5745)
* [ACA-3348] Add default process name pipe * [ACA-3348] Add documentation * [ACA-3348] Change transform function to recieve a process def parameter, Update documentation * Change parameter type to fix build * Fix lint errors * Move unit test to the correct describe * Fix lint errors * Move from one core pipe to different for APS1 and Cloud * Add Pipe to process cloud providers * Update documentation * Revert demo-shell default process name * Fix pipe version in documentation * e2e - select process definition and then type name * Fix process services e2e * Align process filters e2e * Align start-task-form cloud e2e * Use processInstance model instead of processDefinition as a parameter for transform function
This commit is contained in:
44
docs/process-services/pipes/process-name.pipe.md
Normal file
44
docs/process-services/pipes/process-name.pipe.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
Title: Process name pipe
|
||||
Added: v3.9.0
|
||||
Status: Active
|
||||
Last reviewed: 2020-06-02
|
||||
---
|
||||
|
||||
# [Process name pipe](../../../lib/process-services/src/lib/pipes/process-name.pipe.ts "Defined in process-name.pipe.ts")
|
||||
|
||||
When an identifier is specified, the input will be transformed replacing the identifiers with the values of the selected process definition provided.
|
||||
## Basic Usage
|
||||
processNamePipe.transform('Example - %{processDefinition} - %{datetime}', new ProcessDefinitionRepresentation({ name: 'upload-passport'}));
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| processNameFormat | string | undefined | The process name format including the preferred identifiers to be used |
|
||||
| selectedProcessDefinition | ProcessDefinitionRepresentation | undefined | (optional) The selected process definition |
|
||||
|
||||
## Details
|
||||
The pipe offers a convenient way to format a process name using a process name format template.
|
||||
|
||||
The supported identifiers that can be used in the process name format are the following:
|
||||
|
||||
- %{processDefinition}
|
||||
- %{datetime}
|
||||
|
||||
When the %{processDefinition} identifier is used, the selected process definition provided
|
||||
will be added and positioned in the same place as the identifier.
|
||||
|
||||
When the %{datetime} identifier is used, the current datetime will be added and positioned in the same place as the identifier.
|
||||
|
||||
Important Notes:
|
||||
- All the identifiers are case-insensitive.
|
||||
- The identifiers can be used in any position (beginning, middle, end, custom).
|
||||
- The identifiers can NOT be used more than once each in the same processNameFormat (The second occurrence of each identifier will be ignored
|
||||
and handled as a plain string).
|
||||
|
||||
#### Result
|
||||
|
||||
```ts
|
||||
processNamePipe.transform('Example - %{processDefinition} - %{datetime}', new ProcessDefinitionRepresentation({ name: 'upload-passport'}));
|
||||
//Returns 'Example - upload passport - June 02, 2020, 12:00:00 AM'
|
||||
```
|
Reference in New Issue
Block a user