Support for our reactive computational engine


Post by rahulranjan »

Hi
We have gone through DOCs
It says - Chronograph is an open-source reactive computational engine, implemented in TypeScript and developed by Bryntum. It powers the business logic of the Bryntum Gantt.

Is Business Logic Refers to Data Calculations(Late Start / Early Start , Based on Duration Finish Dates )

  1. How The Brytumn Gantt UI Interact with Chronograph i.e How Gantt uses Engine and Chronograph Internally

Post by nickolay »

Hi,

Thats correct, all the business logic of the gantt chart is modeled as reactive Chronograph dataset.

Is Business Logic Refers to Data Calculations(Late Start / Early Start , Based on Duration Finish Dates )

Correct.

How The Brytumn Gantt UI Interact with Chronograph i.e How Gantt uses Engine and Chronograph Internally

The question is a bit too broad. You can study the source files in the Gantt/lib/Engine to understand exactly how that it is done.

Briefly - there's a small layers that combines regular Bryntum Model and Chronograph Entity (ChronoModelMixin). On top of that, gradually, starting from the feature set of basic scheduler all other scheduling features are added.


Post by rahulranjan »

nickolay wrote: Thu Dec 10, 2020 12:35 pm

Hi,

Thats correct, all the business logic of the gantt chart is modeled as reactive Chronograph dataset.

What does Chronograph dataset mean ?
By using this package https://www.npmjs.com/package/@bryntum/chronograph - Passing Raw Dataset let say Duration and Start Date, Task ID Will we be able to get FinishDate or calculated fields. If yes , Then What are ways to setup project and send data in Node Context.

Is Business Logic Refers to Data Calculations(Late Start / Early Start , Based on Duration Finish Dates )

Correct.

So you mean all the logics are calculated using chronograph Library not Engine ?

How The Brytumn Gantt UI Interact with Chronograph i.e How Gantt uses Engine and Chronograph Internally

The question is a bit too broad.

You can study the source files in the Gantt/lib/Engine to understand exactly how that it is done.

Can i Debug The Source File By setting up in Node Context ? If Yes we need Help on this.

Briefly - there's a small layers that combines regular Bryntum Model and Chronograph Entity (ChronoModelMixin). On top of that, gradually, starting from the feature set of basic scheduler all other scheduling features are added.

Where i can find it .


Post by nickolay »

What are you trying to achieve?


Post by rahulranjan »

Hi

  1. We want to Know how brytnum Gantt Interact with Chronograph for Calculating Fields (Late Start , Early Start , Duration based on data we give )(How we can debug it and see).
    .2. Is it Interact with Chronograph only or scheduling Engine https://bryntum.com/docs/gantt/engine/classes/_docs_src_getting_started_.gettingstartedguide.html or anything else (Internally)
  2. We want to Setup Engine(Chronograph or Schedule Engine ?) in Node Context , where we can send/Input Raw Data let say (Task1 , Start Date , And Duration ) and it should output me Finish Date or more columns . Which Package / Library.
    We want to see How Chronograph and Engine Works and how we extend it to our logics.
    First we want to see available of Engine
    How can we start with it .

Post by nickolay »

Scheduling Engine is a package containing business logic of Bryntum Gantt. It is implemented using ChronoGraph. If I'm correct, you want to run the engine and use its API inside of the Nodejs process. You probably don't need to use ChronoGraph directly, however you need to understand its concepts: https://bryntum.github.io/chronograph/docs/modules/_src_guides_basicfeatures_.html#basicfeaturesguide

First you need to import the appropriate project file and create an instance of it:

import { GanttProjectMixin } from "lib/Engine/quark/model/gantt/GanttProjectMixin.js"

const project = new GanttProjectMixin({
    eventsData          : [ { id : 'e1', name : 'Event1', startDate : new Date(2020, 1, 1), duration : 5 } ],
})
await project.commitAsync()

Note, that all calculations in project are asynchronous and performed during commitAsync call. You'll need to wrap the await above.

Then you just use the API:

const event1 = project.getEventById('e1')

console.log(event1.endDate) // new Date(2020, 1, 6)

For example above, we've used the getEventById method of the project: https://bryntum.com/docs/gantt/engine/classes/_lib_engine_quark_model_gantt_ganttprojectmixin_.ganttprojectmixin.html#geteventbyid

The we accessed the endDate property of the GanttEventMixin: https://bryntum.com/docs/gantt/engine/classes/_lib_engine_quark_model_gantt_ganttevent_.ganttevent.html#enddate

To import ES module in Nodejs you probably need to use the esm npm module and launch your node as: node -r esm your_script.js You can also use Node > 14 and set "type : "module" in package.json

Hope that helps.


Post by rahulranjan »

Hi Thanks for it .

nickolay wrote: Thu Dec 10, 2020 1:34 pm

Scheduling Engine is a package containing business logic of Bryntum Gantt. It is implemented using ChronoGraph. If I'm correct, you want to run the engine and use its API inside of the Nodejs process. You probably don't need to use ChronoGraph directly, however you need to understand its concepts: https://bryntum.github.io/chronograph/docs/modules/_src_guides_basicfeatures_.html#basicfeaturesguide

First you need to import the appropriate project file and create an instance of it:

[quote]import { GanttProjectMixin } from "lib/Engine/quark/model/gantt/GanttProjectMixin.js"
[/quote] - How to import the Engine as Node package , Or how to use in Nodejs Project 

const project = new GanttProjectMixin({
    eventsData          : [ { id : 'e1', name : 'Event1', startDate : new Date(2020, 1, 1), duration : 5 } ],
})
await project.commitAsync()

Note, that all calculations in project are asynchronous and performed during commitAsync call. You'll need to wrap the await above.

Then you just use the API:

const event1 = project.getEventById('e1')

console.log(event1.endDate) // new Date(2020, 1, 6)

For example above, we've used the getEventById method of the project: https://bryntum.com/docs/gantt/engine/classes/_lib_engine_quark_model_gantt_ganttprojectmixin_.ganttprojectmixin.html#geteventbyid

The we accessed the endDate property of the GanttEventMixin: https://bryntum.com/docs/gantt/engine/classes/_lib_engine_quark_model_gantt_ganttevent_.ganttevent.html#enddate

To import ES module in Nodejs you probably need to use the esm npm module and launch your node as: node -r esm your_script.js You can also use Node > 14 and set "type : "module" in package.json

Hope that helps.


Post by rahulranjan »

HI
we have setup the project its giving the error

node index.js
node:internal/process/esm_loader:74
    internalBinding('errors').triggerUncaughtException(
                              ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'D:\Schedule Development\EngineProject\lib\ChronoGraph\chrono\Effect.js' imported from D:\Schedule Development\EngineProject\lib\Engine\quark\model\gantt\GanttProjectMixin.js
    at new NodeError (node:internal/errors:278:15)
    at finalizeResolution (node:internal/modules/esm/resolve:307:11)
    at moduleResolve (node:internal/modules/esm/resolve:742:10)
    at Loader.defaultResolve [as _resolve] (node:internal/modules/esm/resolve:853:11)
    at Loader.resolve (node:internal/modules/esm/loader:86:40)
    at Loader.getModuleJob (node:internal/modules/esm/loader:230:28)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:56:40)
    at link (node:internal/modules/esm/module_job:55:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Please find attach project file

Attachments
EngineProject.rar
(239.75 KiB) Downloaded 237 times

Post by nickolay »

Hi,

As the error message suggest, there's no file 'D:\Schedule Development\EngineProject\lib\ChronoGraph\chrono\Effect.js'

Try using the Gantt package - it shows the expected files layout.


Post by rahulranjan »

Hi
Thanks
Able to Achieve it Only problem need to comments few source code line in Helper
like in BroweserHelper.js . Why should it required in Node context


Post Reply