Skip to content

Commit

Permalink
Merge pull request #245 from shibin-aot/dev
Browse files Browse the repository at this point in the history
Dev - master merge
  • Loading branch information
shibin-aot authored Jul 4, 2022
2 parents c2fa6c4 + 6990b35 commit 68ac557
Show file tree
Hide file tree
Showing 114 changed files with 7,557 additions and 836 deletions.
867 changes: 69 additions & 798 deletions camunda-formio-tasklist-vue/src/components/TaskList.vue

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions camunda-formio-tasklist-vue/src/components/layout/LeftSider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@
v-if="task.followUp"
>Follow up in {{ timedifference(task.followUp) }}</div>
</div>
<task-variable v-if="task._embedded&& task._embedded.variable" :variables="task._embedded.variable" :filterTaskVariable="selectedFilterTaskVariable"/>

<task-variable v-if="task._embedded&& task._embedded.variable"
:variables="task._embedded.variable"
:filterTaskVariable="selectedFilterTaskVariable"/>


</div>
</template>
<div
Expand Down Expand Up @@ -169,7 +174,8 @@ export default class LeftSider extends Mixins(BaseMixin) {
public setFormsFlowTaskId: any;
@serviceFlowModule.Mutation("setFormsFlowactiveIndex")
public setFormsFlowactiveIndex: any;
private selectedFilterTaskVariable: any;
private selectedFilterTaskVariable: Array<any> = [];
private getProcessDefinitions: Array<any> = [];
private processDefinitionId = "";
private currentPage = 1;
Expand Down
900 changes: 900 additions & 0 deletions camunda-formio-tasklist-vue/src/components/layout/RightSider.vue

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@
v-if="showVariableValueState[index] === 's'"
@click="updateVariableInput(index)"
>
<span data-bs-toggle="tooltip" data-bs-placement="top" :title="selectedSearchQueries[index].variable "> {{ selectedSearchQueries[index].variable }}</span>

<span v-if="selectedSearchQueries[index].variable== ''">0</span>
<span v-else data-bs-toggle="tooltip" data-bs-placement="top" :title="selectedSearchQueries[index].variable "> {{ selectedSearchQueries[index].variable }}</span>

</div>

</div>
Expand Down Expand Up @@ -138,33 +141,51 @@
{{ formatDate(selectedSearchQueries[index].value) }}
</div>
<template v-if="showSearchState[index] === 'i' && query.type !== 'date'">
<input
<div>
<input
class="form-control"
type="text"
:type="showCalender?'datetime-local':'text'"

v-model="selectedSearchQueries[index].value"
v-on:keyup.enter="
setSearchQueryValue(selectedSearchQueries, index);
showSearchValueItem(index);"
>
<button
class="btn btn-outline-success btn-sm mx-2"
@click="

</div>
<div>
<button
class="btn btn-outline-success btn-sm "
@click="
setSearchQueryValue(selectedSearchQueries, index);
showSearchValueItem(index);"
><i class="fa fa-check"></i>
</button>
<button
><i class="fa fa-check" aria-hidden="true" ></i>
</button>
<button class="btn btn-outline-secondary btn-sm" v-if="query.type === 'variables'"
@click="showCalender = true">
<i class="fa fa-calendar" aria-hidden="true" />
</button>
<button
class="btn btn-outline-danger btn-sm"
@click="rejectSearchValueItem(index)"
><i class="fa fa-times"></i>
><i class="fa fa-times" aria-hidden="true" ></i>
</button>
</div>

</template>
<div
v-if="showSearchState[index] === 's' && query.type !== 'date'"
@click="updateSearchInput(index)"
>

<div v-if="selectedSearchQueries[index].value===''">
0
</div>
<div v-else >
{{ selectedSearchQueries[index].value }}
</div>
</div>

</div>

</div>
Expand Down Expand Up @@ -223,6 +244,23 @@ export default class TaskSearchItem extends Vue {
private taskVariableArray: any = [];
private filteredVariable =[];
private searchListElements: SearchOptionPayload[] = taskSearchFilters;
private showCalender: boolean =false
@Watch("selectedfilterId")
settingTaskVariable (){
if(this.filterList.length&&this.selectedfilterId){
this.filterList.forEach(filterListItem=>{
if(filterListItem.id===this.selectedfilterId){
this.filteredVariable = filterListItem?.properties?.variables ||[];
this.taskVariableArray= filterListItem?.properties?.variables ||[];
}
});
}
}
mounted(){
this.settingTaskVariable();
}
@Watch("selectedfilterId")
settingTaskVariable (){
Expand Down Expand Up @@ -291,6 +329,7 @@ export default class TaskSearchItem extends Vue {
}
setSearchQueryValue(item: SearchOptionPayload[], index: number) {
this.showCalender=false;
this.$root.$emit("call-setSearchQueryValue", {
item: item,
index: index,
Expand Down Expand Up @@ -353,3 +392,12 @@ export default class TaskSearchItem extends Vue {
}
</style>

<style>
::-webkit-datetime-edit-year-field:not([aria-valuenow]),
::-webkit-datetime-edit-month-field:not([aria-valuenow]),
::-webkit-datetime-edit-day-field:not([aria-valuenow]) {
color: transparent;
}
</style>

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
</span>
</div>
<div class="text-truncate ">
<span data-toggle="tooltip" class="ctf-description" data-placement="top" :title="checkVlaueIsDateOrNOt(item.value)">
{{ checkVlaueIsDateOrNOt(item.value)}}

<span data-toggle="tooltip" class="ctf-description" data-placement="top" :title="item.value.toString()">
{{ item.value.toString()}}

</span>
</div>
</div>
Expand All @@ -38,9 +40,7 @@ import {
Vue,
Watch,
} from "vue-property-decorator";
import {
getFormattedDateAndTime
} from "../../services";
@Component
export default class TaskVariable extends Vue {
@Prop() private variables!: any[];
Expand Down Expand Up @@ -87,14 +87,7 @@ export default class TaskVariable extends Vue {
}
}
checkVlaueIsDateOrNOt=(value: any)=>{
const isValueNumber = isNaN(value);
if(isValueNumber){
return getFormattedDateAndTime(value)!=='Invalid Date'?getFormattedDateAndTime(value):value;
}else{
return value;
}
}
}
</script>
Expand Down
34 changes: 21 additions & 13 deletions camunda-formio-tasklist-vue/src/services/SearchOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,19 +160,26 @@ export const FILTER_OPERATOR_TYPES = {
AFTER: "after",
};

const convertingValueNumber =(value: any)=>{
let newValue: any ;
if(value==='false'){
newValue=false;
}else if(value==='true'){
newValue= true;
}else if(isNaN(value)){
newValue=value;

const convertingValueNumber =(searchOption: any)=>{
// if it is not like operator
if(searchOption.operator===FILTER_OPERATOR_TYPES.LIKE){
return `%${searchOption.value}%`;
}else{
newValue= Number(value);
}
return newValue;
};
const value = searchOption.value;
let newValue: any ;
if(value==='false'){
newValue=false;
}else if(value==='true'){
newValue= true;
}else if(isNaN(value)){
newValue=value;
}else{
newValue= Number(value);
}
return newValue;
};



const getProcessedParamObject = (searchOption: SearchOptionPayload) =>
Expand Down Expand Up @@ -234,7 +241,8 @@ export const getFormattedQueryListParams = (
paramList[searchOption.key].push({
name: searchOption.variable,
operator: getVariableOperator(searchOption.operator),
value: convertingValueNumber(searchOption.value),
value: convertingValueNumber(searchOption),

});
}
}
Expand Down
97 changes: 97 additions & 0 deletions rpa-robocorp-extention/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@

# formsflow.ai Camunda RPA Client

![Java](https://img.shields.io/badge/Java-JDK_1.8-blue) ![Windows/Linux](https://img.shields.io/badge/Windows/Linux-OS-blue) ![Robocorp](https://img.shields.io/badge/Robocorp-rcc-blue) ![postgres](https://img.shields.io/badge/postgres-latest-blue)

Run your automation using the camunda rpa client



## Table of Content
1. [Introduction](#introduction)
2. [About the Project](#about-the-project)
* [Features](#features)
3. [Download and Installation](#download-and-installation)
4. [System Architecture](#system-architecture)
5. [Quick Start](#quick-start)
6. [Usage](#usage)
7. [License](#license)
8. [Links](#links)

## Introduction

This is an extension provided by [formsflow.ai](https://formsflow.ai/) to enable RPA feature to automate complex tasks.
Therefore, this application can be extended with camunda by enabling the external task handler from the service task and
further collaborated with a Robot.

## About the Project

The project was initiated by [AOT Technologies](https://www.aot-technologies.com/) as a means of addressing the complex
robotic use-cases which need to be automated outside [formsflow.ai](https://formsflow.ai/).

Typical use cases are:

* Browser task eg: web scraping.
* Tedious excel task eg: copying data from other sources to a given Excel file.
* PDF task eg: associating html pages / images to a PDF file.

### Features

* Builtin association with OpenSource RPA framework Robocorp.
* Configurable robot with audit and history.
* Support both cloud and command line robots.
* Input / Output operation supported.
* Supports multiple OS eg: Windows 10, Linux.
* Supports Docker build.

## Download and Installation

For download and setup, follow the [installation guide](./external-client-extention/INSTALLATION.md), you will find step-by-step instructions to download and install.

## System Architecture

![Architecture](https://user-images.githubusercontent.com/85665463/150078528-f05637b5-ae37-48c1-b4e4-501fb11c08d9.png)

## Quick Start

Following instructions need to be followed to run this project.

1. Make sure to have Camunda running.
2. Create a simple process model with an External Service Task and define the topic as 'topicName'
3. Deploy the process to the Camunda Platform engine.
4. Create a robot and associate it with the topic like in BackgroundCheckRobotHandler by creating a new handler.
5. Start the camunda-rpa-client app.
6. Log in to formsflow.ai web component and associate the workflow with a form and submit the form.
7. The robot will be triggered

## Usage

For usage instructions, Please refer [here](./external-client-extention/USAGE.md)

## About External Client

This project is an extension to camunda's own [External task client](https://github.com/camunda/camunda-bpm-platform/tree/master/clients/java) to run robots

This works based on an external task subscription, it triggers the robots using [rcc](https://robocorp.com/docs/rcc/installation).

On completion of the robot, the external task client will send the completion request with data if any to camunda.


## License

Copyright 2020 AppsOnTime-Technologies 2020

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


## Links
43 changes: 43 additions & 0 deletions rpa-robocorp-extention/external-client-extention/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
HELP.md
target/
src/main/resources/robots/web-scraper/output/
src/main/resources/robots/background-check/output/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
*-db.mv
*-db.trace
*.iml
.mvn
mvnw*

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

### Docker ###
.env
Loading

0 comments on commit 68ac557

Please sign in to comment.