Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement selection of dataTypesToSign for signing tasks in process config panel #12784

Closed
standeren opened this issue May 8, 2024 · 0 comments · Fixed by #12869
Closed

Implement selection of dataTypesToSign for signing tasks in process config panel #12784

standeren opened this issue May 8, 2024 · 0 comments · Fixed by #12869
Labels
area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc).

Comments

@standeren
Copy link
Contributor

standeren commented May 8, 2024

Description

Signing tasks must have defined xml elements in bpmn process file of which data types to sign, meaning what data types that should be added the signature field after the actual signing when the app is running.
There should be a multiselect dropdown in the config panel (only for taskTypes signing) where the user can select from all data types in appmetadata. There should also be some information of what the user selects here since it is not the same as selecting data models for a data task.
When the data types are selected in the multiselect they should be added to the bpmn signing element on the dataTypes property, defined here (in SupportedPaletteProvider.js):

const extensionElements = bpmnFactory.create('bpmn:ExtensionElements', {
          values: [
            bpmnFactory.create('altinn:TaskExtension', {
              taskType: taskType,
              actions: bpmnFactory.create('altinn:Actions', {
                action: [
                  bpmnFactory.create('altinn:Action', {
                    action: 'sign',
                  }),
                  bpmnFactory.create('altinn:Action', {
                    action: 'reject',
                  }),
                ],
              }),
              signatureConfig: bpmnFactory.create('altinn:SignatureConfig', {
                dataTypesToSign: bpmnFactory.create('altinn:DataTypesToSign', {
                  dataTypes: [], // This property should be updated with bpmnFactory.create('altinn:DataType', { dataType: [DATA_TYPE_ID]}),
                }),
                signatureDataType: `signatureInformation-${generateRandomId(4)}`,
              }),
            }),
          ],

To update the property use modeling.updateModdleProperties(...)

See EditActions for inspiration.

@standeren standeren added status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design. area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc). labels May 8, 2024
@mlqn mlqn self-assigned this May 22, 2024
@WilliamThorenfeldt WilliamThorenfeldt removed the status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design. label May 24, 2024
@mlqn mlqn linked a pull request May 28, 2024 that will close this issue
3 tasks
@mlqn mlqn removed their assignment Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc).
Projects
Status: 🧪 Test
Development

Successfully merging a pull request may close this issue.

3 participants