Categories
Automated Testing JavaScript Selenium

Selenium & JavaScript

Selenium documentation

Initialize the project

npm init -y
// https://www.npmjs.com/package/selenium-webdriver?activeTab=readme
npm i selenium-webdriver
Categories
JavaScript

JavaScript ES6

ES6, also known as ECMAScript 2015, introduced several new features and syntax improvements to JavaScript. Here are some key aspects of ES6:

Categories
API Bizagi

Working with Bizagi APIs

Authentication

Go to OAuth2 Applications option under the Admin>Security and register a new application:

Create the Authorization Token

With the Client Id and Client Secret, go to base64encode.org and encode the following: ClientId:ClientSecret.

Set up Postman

POST: {{projectURL}}/oauth2/server/token

For the Authorization header parameter use the following structure: Basic {{the encode ClientId:ClientSecret from the above step}}

Body > raw > JSON: grant_type=client_credentials&scope=api

The result:

Endpoints

General use

GET odata/data/stakeholders
Lists the name of Stakeholders in your project.

GET /odata/data/userProfile
Obtains information regarding the authenticated user.

GET /odata/Image
Obtains detail of an image (base 64).

GET /odata/data/searchByCaseNumber(caseNumber='[id_case]’)
Obtains detail for a given case number.

GET /odata/data/queries
Lists all query forms in your project

GET /odata/data/entities
Lists all manageable entities (parameter entities and stakeholders)

My stuff

GET /odata/data/stuff
Lists all collections set as my stuff (applicable to a Stakeholder, starting from this resource).

GET /odata/data/stuff([id_stuff])
Obtains information of a given collection set of my stuff.

GET /odata/data/stuff([id_stuff])/actions
Lists all actions available for a given collection of my stuff.

GET /odata/data/stuff([id_stuff])/actions([id_action])
Obtains specific information of a given action available for a given collection of my stuff.

GET /odata/data/stuff([id_stuff])/values
Obtains all records of a given collection of my stuff.

GET /odata/data/stuff([id_stuff])/values([id_value])
Obtains a given record of a given collection of my stuff.

GET /odata/data/stuff([id_stuff])/values([id_value])/actions
Lists all actions available for a given record of a given collection of my stuff.

GET /odata/data/stuff([id_stuff])/values([id_value])/actions([id_action])
Obtains specific information of a given action available for a record of a given collection of my stuff.

GET /odata/data/stuff([id_stuff])/values([id_value])/actions([id_action])/relatedEntities
Lists all attributes which are related entities needed to fire an action (of a given record of a given collection of my stuff).

GET /odata/data/stuff([id_stuff])/values([id_value])/actions([id_action])/relatedEntities([id_related])
Obtains a given attribute which is a related entity needed to fire an action (of a given record of a given collection of my stuff).

GET /odata/data/stuff([id_stuff])/values([id_value])
/actions([id_action])/relatedEntities([id_related])/values
Obtains all possible values of a given attribute which is a related entity, needed to fire an action (of a given record of a given collection of my stuff).

GET /odata/data/stuff([id_stuff])/values([id_value])/actions([id_action])/relatedEntities([id_related])/values([id_value])
Obtains a given value of a given attribute which is a related entity, needed to fire an action (of a given record of a given collection of my stuff).

POST /odata/data/stuff([id_stuff])/values([id_value])/actions([id_action])/execute
Executes an action available for a given record of a given collection of my stuff.

GET /odata/data/stuff([id_stuff])/values([id_value])/navigations
Browses for other attributes whose information need to be drilled down for (for a given record of a given collection of my stuff).

GET /odata/data/stuff([id_stuff])/values([id_value])/navigations([id_navigation])
Browses for a given attribute whose information needs to be drilled down for (for a given record of a given collection of my stuff).

GET /odata/data/stuff([id_stuff])/values([id_value])/navigations([id_navigation])/values
Obtains all information about a given attribute in a related entity, for a given record of a given collection of my stuff.

GET /odata/data/stuff([id_stuff])/values([id_value])/navigations([id_navigation])/values([id_value])
Obtains specific information about a given attribute in a related entity, for a given record of a given collection of my stuff.

GET /odata/data/stuff([id_stuff])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations
Browses for other attributes whose information need to be drilled down for (for a given related entity attribute of a given record from a collection of my stuff).

GET /odata/data/stuff([id_stuff])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])
Browses for a given attribute whose information needs to be drilled down for (for a given related entity attribute of a given record from a collection of my stuff).

GET /odata/data/stuff([id_stuff])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values
Obtains all information about a given attribute in a related entity (for a given related entity attribute of a given record from a collection of my stuff).

GET /odata/data/stuff([id_stuff])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values([id_value])
Obtains specific information about a given attribute in a related entity (for a given related entity attribute of a given record from a collection of my stuff).

GET /odata/data/stuff([id_stuff])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations
Browses for other attributes whose information need to be drilled down for (for a given related entity attribute, 2 levels down, of a given record from a collection of my stuff).

GET /odata/data/stuff([id_stuff])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])
Browses for a given attribute whose information needs to be drilled down for (for a given related entity attribute, 2 levels down, of a given record from a collection of my stuff).

GET /odata/data/stuff([id_stuff])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values
Obtains all information about a given attribute in a related entity (for a given related entity attribute, 2 levels down, of a given record from a collection of my stuff).

GET /odata/data/stuff([id_stuff])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values([id_value])
Obtains specific information about a given attribute in a related entity (for a given related entity attribute, 2 levels down, of a given record from a collection of my stuff).

Searches

GET /odata/data/searches
Lists all searches (applicable to a Stakeholder, starting from this resource).

GET /odata/data/searches([id_search])
Obtains information of a given search.

GET /odata/data/searches([id_search])/actions
Lists all actions available for a given search.

GET /odata/data/searches([id_search])/actions([id_action])
Obtains information of a given action available for a given search.

POST /odata/data/searches([id_search])/performSearch
Executes a given search.

GET /odata/data/searches([id_search])/relatedEntities
Obtains the set of entities that are specified as Entity parameter type required by the process to start a case.

GET /odata/data/searches([id_search])/relatedEntities([id_related])
Obtains additional information about a specific entity required by a given process as an Entity parameter to start a case.

GET /odata/data/searches([id_search])/relatedEntities([id_related])/values
Obtains the set of possible values of a given entity required by a specific process to star a case.

GET /odata/data/searches([id_search])/relatedEntities([id_related])/values([id_value])
Obtains additional information about a specific value of a given entity required by a specific process to start a case.

GET /odata/data/searches([id_search])/results
Obtains results of a given search, which is executed without sending parameters.

GET /odata/data/searches([id_search])/results([id_result])
Obtains a specific result of a given search, which is executed without sending parameters.

GET /odata/data/searches([id_search])/results([id_result])/actions
Lists all actions available for a given result of a given search executed without sending parameters.

GET /odata/data/searches([id_search])/results([id_result])/actions([id_action])
Obtains a specific action available for a given result of a given search executed without sending parameters.

GET /odata/data/searches([id_search])/results([id_result])/actions([id_action])/relatedEntities
Obtains all possible values of a given attribute which is a related entity, needed to fire an action (available for a given result of a given search executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/actions([id_action])/relatedEntities([id_related])
Obtains a given attribute which is a related entity needed to fire an action (available for a given result of a given search executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/actions([id_action])/relatedEntities([id_related])/values
Obtains all possible values of a given attribute which is a related entity, needed to fire an action (available for a given result of a given search executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/actions([id_action])/relatedEntities([id_related])/values([id_value])
Obtains a specific value of a given attribute which is a related entity, needed to fire an action (available for a given result of a given search executed without sending parameters).

POST /odata/data/searches([id_search])/results([id_result])/actions([id_action])/execute
Executes an action (available for a given result of a given search executed without sending parameters).

GET odata/data/searches([id_search])/results([id_result])/navigations
Browses for other attributes whose information need to be drilled down for a given result of a given search (which is executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/navigations([id_navigation])
Browses for a given attribute whose information needs to be drilled down for a given result of a given search (which is executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/navigations([id_navigation])/values
Obtains all information about a given attribute in a related entity, for a given result of a given search (which is executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/navigations([id_navigation])/values([id_value])
Obtains specific information about a given attribute in a related entity, for a given result of a given search (which is executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/navigations([id_navigation])/values([id_value])/navigations
Browses for other attributes whose information need to be drilled down (for a given related entity attribute of a given result coming from a search executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])
Browses for a given attribute whose information needs to be drilled down (for a given related entity attribute of a given result coming from a search executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values
Obtains all information about a given attribute in a related entity (for a given related entity attribute of a given result coming from a search executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values([id_value])
Obtains specific information about a given attribute in a related entity (for a given related entity attribute of a given result coming from a search executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations
Browses for other attributes whose information needs to be drilled down (for a given related entity attribute, 2 levels down, of a given result coming from a search executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])
Browses for a given attribute whose information needs to be drilled down (for a given related entity attribute, 2 levels down, of a given result coming from a search executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values
Obtains all information about a given attribute in a related entity (for a given related entity attribute, 2 levels down, of a given result coming from a search executed without sending parameters).

GET /odata/data/searches([id_search])/results([id_result])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values([id_value])/navigations([id_navigation])/values([id_value])
Obtains specific information about a given attribute in a related entity (for a given related entity attribute, 2 levels down, of a given result coming from a search executed without sending parameters).

Relevant processes

GET /odata/data/relevants
Lists all relevant processes.

GET /odata/data/relevants([id_relevant])
Obtains information about a given relevant process.

POST /odata/data/relevants([id_relevant])/start
Fires a new case for a relevant process.

GET /odata/data/relevants([id_relevant])/relatedEntities
Lists all attributes which are related entities needed to fire a new case (of a given relevant process).

GET /odata/data/relevants([id_relevant])/relatedEntities([id_related])
Obtains a given attribute which is a related entity needed to fire a new case (of a given relevant process).

GET /odata/data/relevants([id_relevant])/relatedEntities([id_related])/values
Obtains all possible values of a given attribute which is a related entity, needed to fire a new case (of a given relevant process).

GET /odata/data/relevants([id_relevant])/relatedEntities([id_related])/values([id_value])
Obtains a given value of a given attribute which is a related entity, needed to fire a new case (of a given relevant process).

GET /odata/data/relevants([id_relevant])/actions
Lists all actions available for a given relevant process.

GET /odata/data/relevants([id_relevant])/actions([id_action])
Obtains information of a given action available for a given relevant process.

GET /odata/data/relevants([id_relevant])/actions([id_action])/relatedEntities
Lists all attributes which are related entities needed to fire an action (of a given relevant process).

GET /odata/data/relevants([id_relevant])/actions([id_action])/relatedEntities([id_related])
Obtains a given attribute which is a related entity needed to fire an action (of a given relevant process).

GET /odata/data/relevants([id_relevant])/actions([id_action])/relatedEntities([id_related])/values
Obtains all possible values of a given attribute which is a related entity, needed to fire an action (of a given relevant process).

GET /odata/data/relevants([id_relevant])/actions([id_action])/relatedEntities([id_related])/values([id_value])
Obtains a given value of a given attribute which is a related entity, needed to fire an action (of a given relevant process).

Processes

Categories
Bizagi Tips and Tricks

How to update an entity not related to the data model

An easy way to update an entity which is not related to the data model is to use the CEntityManager method called GetEntity. This comes in handy when the SOA layer is not accessible as this is the only way you can perform this operation.

Categories
Best Practices Bizagi

How to Keep Track of Deployments (Bizagi)

Bizagi is a very peculiar tool when it comes to deployments and if you are not well organized, things can go south pretty quickly.

In my current project, the production environment is in use 24/7 and the opportunities for a new release window are slim to none. So, imagine having issues in production just because you forgot to import the values of a new parameter entity.

Categories
Bizagi Tips and Tricks

Date, DateTime data types

Convert Date or DateTime to String data type

var sDateTimeFormatted = dDateTime.ToString("MM/dd/yyyy hh:mm");
var sDateFormatted = dDate.ToString("MM/dd/yyyy");

Or you could use String.Format

var sDateFormatted = System.String.Format("{0:d}",DateTime.Now);

Use this to convert it for XML

var dTransactionDate = DateTime.Now;
var sTransactionDate = XmlConvert.ToString(dTransactionDate, XmlDateTimeSerializationMode.Unspecified);

Dates as filters for entities

[dDateDelivered != null AND dDateDelivered >= '08/22/2019 12:00:00 AM']

Bizagi’s way

<format-date(<XPath>,"format")>
Categories
Bizagi Tips and Tricks

Escape Character in Bizagi

Use backslash (\) for string escape. See the following examples:

var sAttribute = "test";
var xCollection= Me.getXPath("entity-list(\"mEntity\", \"sAttribute = '"+ sAttribute +"' AND bActive = 1\")");
var xCollection= Me.getXPath("entity-list('mEntity','sAttribute = \"test\" ')");
Categories
Excel

Working with Excel

Conditional formatting

This can be found on the Home > Style > Conditional Formatting.

Excel Conditional Formatting

Whenever you want to want to use a formula, I found it easier to do this trick. Create the formula next to the column you want to apply the formatting. In the case below, I want to check if the value is greater than 100 (=A2>100, =A2>100 etc)

Categories
AI Resources

Free AI Training Course (Microsoft)

Introduction

Microsoft and LinkedIn have joined forces to address the increasing demand for artificial intelligence (AI) skills in the workforce. With the launch of the AI Skills Initiative, Microsoft aims to provide individuals with the necessary knowledge and tools to effectively leverage AI technology. Emphasizing the importance of responsible and ethical AI use, this initiative is designed to equip participants with the skills needed for the future of work.

Categories
Bizagi Tips and Tricks

Error Could not generate assembly for

Web portal error in Bizagi

Error Type: BaseException

Error Message: Unable to process control: _. Control type: ContentPanel. Unable to process property: _. Error processing Rule = _; Error: Error Evaluating Rule _ -Error Could not generate assembly for [C:\home\site\wwwroot\App_Data\Temporary\ComponentLibrary\BizAgi.ComponentLibrary.CRuleContextJS.js]: Errors: Error Line,Column:596,26 Error Description: ‘get’ is a new reserved word and should not be used as an identifier