AisWorkflowWidget
AisWorkflowWidget is a component that makes it much easier to embed the Universal Workflow Widget within your application. It wires everything up for you. All you need to provide is your OAuth2 client-id
and scope
; the environment you're in (prod
or test
); and the formId
, packageId
and signatureId
.
<script setup>
import { computed, ref } from 'vue'
import AisWorkflowWidget from '@/components/workflow/AisWorkflowWidget.vue'
const config = useAisAuthConfig()
const route = useRoute()
const id = route.query.id || ''
/* For when user is coming to the form page from within your app (not from workflow) */
const myDataObject = id ? await useAisFetch(`/data/${id}`) : ref({})
/* if these query parameters exist (like when coming to the form page from workflow) then use their values, otherwise,
try retrieving them from your app's data object
*/
const formId = computed(() => route.query.formId || myDataObject.value?.formId || '')
const packageId = computed(() => route.query.packageId || myDataObject.value?.packageId || '')
const signatureId = computed(() => route.query.signatureId || '')
</script>
<template>
<AisWorkflowWidget :form-id="formId"
:package-id="packageId"
:signature-id="signatureId"
client-id="components"
scope="workflow.api.components"
:env="config.isProd ? 'prod' : 'test'"></AisWorkflowWidget>
</template>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Component Reference
Props
Property 1 | Type(s) | Description | Required | Default |
---|---|---|---|---|
clientId | String | The uiowa oAuth2 client id | '' | |
env | String | The application/workflow environment Valid values: test, prod | '' | |
formId | String | The form id in Universal Workflow | '' | |
packageId | String | The package id in Universal Workflow | '' | |
scope | String | The oAuth2 scope | '' | |
signatureId | String | The signature id in Universal Workflow | '' |
Slots
Name 1 | Scoped | Description |
---|---|---|
Events
Event 1 | Arguments | Description |
---|---|---|