This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.2.0.
npm install ft-workflowThis library was generated with Angular CLI version 18.2.0.
This library contains a Workflow Management System built using Angular 18 and the drawflow plugin. The system allows users to create, update, and manage workflows visually, with each action represented as a node in the workflow. The JSON structure generated by the drawflow plugin is essential for API calls and UI rendering.
- Angular: v18.
- Nodejs: v18.19.1.
- nvm: v0.39.5.
- npm: v10.2.4.
``bashInstall dependencies
npm install ft-workflow@latest --force
- Add the below code to angular.json file to initialize dependencies`bash
"styles": [
"node_modules/@fortawesome/fontawesome-free/css/all.min.css",
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.scss"
],
`
- Add routings to use the library component`bash
export const routes: Routes = [
{ path: '', loadChildren: () => import('ft-workflow').then(m => m.FtWorkflowModule) },
{ path: '', redirectTo: '', pathMatch: 'full' }
];
`
- Add library tag to view in html`bash
`
- Import FtWorkflowComponent
`bash
@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet,FtWorkflowComponent],
templateUrl: './app.component.html',
styleUrl: './app.component.scss'
})
`
- To get the list of workflows`bash
Import FtWorkflowModule
``bash
import {FtWorkflowComponent, FtWorkflowModule, LocalstorageService} from "ft-workflow";export class AppComponent {
constructor(private localstorageService: LocalstorageService) {
this.getData();
}
getData(){
const workflowData = this.localstorageService.getItem('workflowData');
}
}
`- To get the workflow based on srNo.
`bash
import {FtWorkflowComponent, FtWorkflowModule, LocalstorageService} from "ft-workflow";export class AppComponent {
constructor(private localstorageService: LocalstorageService) {
this.getWorkflowBySrNo();
}
getWorkflowBySrNo(){
const selectedWorkflow = this.localstorageService.getSingleItemData(1)
}
}
``