https://github.com/changhuixu/uiowa-universal-workflow
Components for UIowa Universal Workflow routing history and widget
https://github.com/changhuixu/uiowa-universal-workflow
angular component uiowa universal-workflow workflow
Last synced: 3 months ago
JSON representation
Components for UIowa Universal Workflow routing history and widget
- Host: GitHub
- URL: https://github.com/changhuixu/uiowa-universal-workflow
- Owner: changhuixu
- License: mit
- Created: 2023-05-05T18:45:12.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-07T20:57:57.000Z (about 1 year ago)
- Last Synced: 2025-10-21T11:59:58.766Z (8 months ago)
- Topics: angular, component, uiowa, universal-workflow, workflow
- Language: TypeScript
- Homepage: https://changhuixu.github.io/uiowa-universal-workflow/
- Size: 753 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UIOWA Universal Workflow
[](https://github.com/changhuixu/uiowa-universal-workflow/actions)
[](https://www.npmjs.com/package/@uiowa/universal-workflow)
This NPM package `@uiowa/universal-workflow` serves as the standard way to display Universal Workflow widget and routing history in Angular. The package contains two components, `workflow-widget` and `uw-routing-history`, and a service `WorkflowService`.
This package depends on `@uiowa/spinner` which shows a loading placeholder while the Universal Workflow data is loading.
[Demo](https://changhuixu.github.io/uiowa-universal-workflow/)
## Usage
- The Widget Component
```html
@if(uwPermissions?.canSign){
} @else {
}
```
```ts
ngOnInit(): void {
this.route.queryParamMap
.pipe(
switchMap((params: ParamMap) => {
if (!params) {
return of(null);
}
this.packageId = +(params.get('packageId') || '');
if (!this.packageId) {
return of(null);
}
this.loading.set(true);
return this.svc.getMyForm(this.packageId).pipe(finalize(() => this.loading.set(false)));
})
)
.subscribe((x) => {
if (x) {
this.dataRows = x.data;
this.uwPermissions = x.permissions;
}
});
}
```
- The Routing History Component
```html
```
- The Workflow Service
By default, you don't need to touch the `WorkflowService`. The service has two methods: `getWorkflowWidgetConfig()` and `getPackageRoutingHistory(packageId: number): Observable`, which call backend API endpoints `${this.api}/widget-config` and `${this.api}/packages/${packageId}/routing-history` where `protected readonly api: string = 'api/workflow'`.
If you decide to choose a different implementation, then you can follow the demo app in this solution to provide another service.