[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 379: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4505: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4507: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4508: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
From Flames To Fork, Comes Freedom • View topic - Rise of The Ninja

Rise of The Ninja

The migration of Adempiere modules to iDempiere

Rise of The Ninja

Postby red1 » Thu Oct 13, 2016 1:44 pm

This is a continuation of the Aladdin magic here viewtopic.php?f=45&t=1821
(Download brand new here http://wiki.idempiere.org/en/Plugin:_RED1_NINJA)
However as the magic becomes even more awesome, it is evolving into a 'Ninja' plugin. Super-fast, magical, having killer moves with simple elegance. Life with iDempiere is now even more divine. The last stuff i did there was generating the Callout JSR223 metacode and Workflow records. Today i am posting a further improvement to the Callout which is to traverse the calling window's models to get to a distance field value and passing it to any other field. After this i will tackle the Kanban Board generation.

You can now call up in unlimited fashion other models connected to the calling window model and any of its property field to pull its value into anywhere of present window. Lets look at this example:

CalloutScript.png
CalloutScript.png (11.49 KiB) Viewed 37705 times
This when saved will generate the following JSR223 Rule Script without you thinking about it.

GeneratedJSR223.png
GeneratedJSR223.png (31.97 KiB) Viewed 37705 times
What the script is doing is to get its BPartner record and call its associated BP Group record to see what is its property in this case Name. You can always go to the Rule window and edit the resulting JSR223 script to fit your exact needs. You need not do anymore manual plumbing! You can see in the following window which i tested it, i entered something into the Name field and the Description field gets filled with the Business Partner Group's Name.

CalloutComplexResult.png
CalloutComplexResult.png (21.22 KiB) Viewed 37704 times
I will do a movie later showing it works! Or i will do the Kanban Board handling to be even more instant!
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Sun Oct 23, 2016 1:05 pm

red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Sat Oct 29, 2016 6:24 am

I am now spending time taking a step back to refactor the whole awesome thing into a proper complete killer. It will not be triggered via Save key, but proper Process which can enact whole module setting up or choice of individual scripts. And thus those scripts can be saved in bulk set as if it is the installer for whole ERP modules! This can be the better alternative to 2Pack (as a transporter of module at the same time).
Also the header of the module will be its summary menu in the menu tree. My artistic design team in the basement has even come out with a cover design:

red1ninja.png
red1ninja.png (344.97 KiB) Viewed 37418 times

Enroute, I am also making the Kanban Board and document action/status generation (taking code from Nicolas Mcoud team). Note the brand new layout below. Note the Generate Module button unveiled.

ModuleMaker.png
ModuleMaker.png (96.54 KiB) Viewed 37418 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Sun Nov 06, 2016 8:07 pm

I have made a blank plugin for use with the Ninja module creator. Fetch it from http://bitbucket.org/red1/org.red1.blank. It will be populated when CodeMaker is used.

I made a movie showing how nice it all works in one piece. I have made a test sample set of scripts (Hospital and BigMenu) for quick test and reference of how to design your own ERP module on the fly.
Big Menu has useful goodies for the View panel as Infowindows on the AD's ColumnSQL/Callout and Sales Orderline view.


The Hospital Module will have 7 models, 2 master-detail arrangements, 2 callouts for a single model, its Infowindow and Workflow guide, all generated in 15 seconds. The CodeMaker definition generates its ORM of all models. This is only necessary if you are doing further coding processes on those models. Otherwise the generated module can input, lookup and manage data including reporting right away.

The binary RED1 NINJA plugin for use in an iDempiere instance is in http://sourceforge.net/projects/red1/fi ... leCreator/
Source is here https://bitbucket.org/red1/org.red1.ninja

What is new here is the Sequence numbering, which the iteration will order by. So you have to ensure its model dependency arrangement correctly, i.e. a lookup Bed_ID in BedRegistration will need the Bed model done first. Sequence ordering is not needed in CodeMaker as the code generated are blind. Also the ModelMaker tab is processed first before CodeMaker tab as the GenerateModel will check for the model data.
There is minimal reference checking of the scripts, so be careful when scripting them. However upon hitting an error it will rollback and not commit. Read the ERROR notice in red on top left or click on its message to read it fully what is missing in your script or its dependency arrangement. There is also the All Nodes checkbox which will test all headers without committing the models and replying a prompt on top left of roughly how many new models and columns are involved.
During testing you may switch off the CodeMaker lines to non active. There is nothing to test actually for codegeneration. Also you may keep it off during ModelMaker processing as it does not detect those new models just yet until they are committed. Then activate back the CodeMaker records.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Tue Nov 08, 2016 3:38 pm

Made nice improvements:
1. The test mode (All Nodes) will not commit the code stubs. Log.info output shows proof.
2. Concurrent execution with ModelMaker tab will retrieve all new models and generate the I and X classes. I have to fork the original classes into the plugin to inject the TrxName.
3. C_BPartner_ID>PatientName will give the alternative label during Window field creation. It works even as an update!

TestModeCodeGenerate.png
TestModeCodeGenerate.png (71.69 KiB) Viewed 37231 times

FullCodeStubs.png
FullCodeStubs.png (30.2 KiB) Viewed 37232 times

AlternateFieldLabel.png
AlternateFieldLabel.png (74.91 KiB) Viewed 37232 times
I tested that the BP Name swap occur correctly for its parent tab too. Even if you forgot to set the window field name on first run, you can just activate back that single record as an update. It works!

BP-PatientName.png
BP-PatientName.png (27.91 KiB) Viewed 37226 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Thu Nov 10, 2016 9:04 pm

Now i added a Delete Model feature! It gives the plug out effect. You can now find it in the ModelMaker tab process icon of the RED1 NINJA plugin. It is quite intelligent and thorough, deleting all related metamodels (not data - you have to do that manually). It will warn you if data exists. It has a test mode (All Nodes box). It will also catch exceptions and throw on the main panel top left instead of looking for it in the logs. It will also delete Infowindow structure. It only allows User Defined EntityTypes to be deleted. So you need not worry that core Dictionary is touched. All associated menu tree items will also be removed.
This can also solve any plugin models that the user wants removed. So this is the best tool for the 'Unplugin' action. Silent and fast as the Ninja name says.

DeleteProcess.png
DeleteProcess.png (82.77 KiB) Viewed 37202 times

DeleteHelp.png
DeleteHelp.png (43.27 KiB) Viewed 37168 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Fri Nov 11, 2016 3:34 am

Attachments
PackOutData.png
PackOutData.png (68.36 KiB) Viewed 37128 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Fri Nov 11, 2016 11:02 am

Orlando Curieless raised a good question about model dependency integrity http://groups.google.com/forum/#!topic/ ... siFnQ94FyQ
In addition to my answer there, i like to treat the raised example in depth here.

Let's say you intend to make in C_Order some extended functions i.e. to calculate some product charges and insert into the total price. Now in our (together with a client user in the ) experience, the bad way to do it is to make changes in the core, both code and model wise.

My plugin enforces what i preached about maximum separation from the core. The code is not anywhere near or in the base core plugins. It is totally in a separate new plugin (org.red1.blank is given free for this purpose and convenience). CodeMaker generates quickly and complete working stubs into this plugin location (you may rename both plugin and location path).

The extended properties generated for i.e. C_Order model will not be inside them (though my plugin could do that but it be against my doctrine) but as extra new sub tabs below C_Order, i.e. C_OrderProductCharges. This is what the developer in the BlackPaper whom I coached well has finally and entirely did. He proudly cleared the mess, declared to me about some months later that he did remove all core changes successfully and completely as a separate plugin where the core iDempiere can now migrate upward with virtually no impact(!). He even told me performance is now scary (silent and fast) when it was crashing almost every day and sometimes right away when you opened the old Invoice window as the product charges were right in the C_OrderLine.

(Don't be alarmed. That crashing though true, is rare but here is what happened. The same C_OrderLine, impregnated with more entangled properties, was called by more tabs in the same window! What a mess! The solution or rule should be different tab to different separate model tables. Or use an InfoWindow that joins different models.) (Note also there are other bigger issues at stake. Separation of concern allows portability, scalability and manageability just to name a few.)

This decoupled design is vital and the use of OSGi allows and emphasises that 'loosely coupled, tightly cohesive' concept. Thus when you uninstall or remove the ProductCharges plugin containing code, you should also be able to remove its model. Both code and model works hand in hand. The plugin code works on the C_OrderLine product items and look up its Charges table. When it is pulled out, it no longer does that and thus you cleanly separated the plugin as if its a normal plug-out now. The data extensions is thus redundant and merely deactivate them may cause continous confusion.

Of course old data is in separate C_OrderProductCharges and they can easily be dropped manually (or archived, which gives me a good idea but later). The use of UUID is also powerful in ensuring eternal integrity. However I do not enforce TableIndex and UUID generation which can be easily be done manually after creation. I intend to keep things light and fast.

Of course this Delete Model is useful mostly during design and development test stage. It is not meant to be useful once you cast your design in stone and have i.e. PrintFormats working on them (I might make a PrintFormat remove feature though!). The Delete Model is useful to also hide your trade secret in meta-model design and that be tedious work to clear every field, every column, every tab and window by hand.

In the end this set of tools in RED1 NINJA is meant to allow normal and expected behaviour of a modern world class application suite. I also maintain scriptic DSL approach because having datatype references in the input will defeat the purpose of making the tool light, fast and also easy to maintain for me. So far during demonstrations to my audiences, i rarely hit bugs. Perhaps it is because i am its own coder and thus knows right away where it will break when it does. However the better credit goes to the community who has brought much of the best practice code for me to just stand on their shoulders. That is why i must constantly thank Nicolas Mcoud and Mohamed Dernoun for sharing their core table creation code.

Bear in mind I am not perfect in my deliberation as i think linearly. I do not worry too much what is down the line because i am not working on a real user project but been a theoreticist working on an assumption and wishing to see how far this assumption carries me. That is why i fully and truly supports open source and am highly gratified when i do receive feedback - good or bad (better).
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Fri Nov 11, 2016 11:00 pm

Made a movie about the Delete Model part -

red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Mon Nov 14, 2016 2:21 pm

[Under Construction - check back later]
I am now creating a most powerful integration tool feature that can bring in any external data into the ERP application with a single stroke.

What it does is to fetch any csv file which most people in the world are familiar with that has the column headers and the external data in it. The tool will iterate those elements and create a Table with those headers as column.

The user can validate the imported data adding more rules in the generated Import[table].java.

Steps:
1. Set the external data with header line:
a. Dependent tables first.
b. Lookup prior tables is by Table_ID>Name where Table is prior dependent and Name is field header. For example: Bed_ID>Name.

2. At the Code Maker tab, create a new record and give Name (to be table name)
a. Attach csv file.
b. Run Import Model process

3. Relogin and find in Main Menu: ModelName - Import[Table] window. It is the temporary imported raw data.
a. Examine the loaded dataset for errors.
b. Load more data if needed.
c. Click on Import button. It will execute Import[Table].java (You can extend rules within it first.)
d. The target final table is populated.

Note: this is in compliance to the already prevailing Import Loader Format framework inside iDempiere.
During Import Model, there can be a pull down whether you wish for an alternative final direct target table besides the temporary staging I_table. You can also change the Import java to do stuff such as Master Detail window. You then select either table of a master-detail pair to be the target. (Later i can see if the generated code can be as close or exact to a master-detail handling.)

However for a quick POC start, I will just make a check that if the table exist then append data to it.

(Post-Log : Heh, scrap all that. Just got a brilliant idea. Parse the CSV elements into the ColumnSet!! Will show it soon.)
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Tue Nov 15, 2016 9:50 pm

The above described Import Model is now done using the last minute ColumnSet idea. That will bypass the need of setting up ImportLoader format. It is now fast, great and too good to be true. Now you need not even think of how to create a model. Just export your legacy data into a single Excel CSV file. The first line in the file is the header. The rest is data. You can append data to already created set.
The data field can also be in the form of (model)_ID and the 'Name' value is looked up and its _ID key is returned and stored in the DB. For example in with a C_BPartner_ID value of 'Joe Block', the code will lookup the C_BPartner table and search for 'Joe Block' and return its key integer instead. When completed you can browse the imported data and find the 'Joe Block' as a DirectTable type.
If you want specific data type in the ColumnSet, it will parse it for you. Use Date in your field and it will be parsed to D#, Qty to Q#, Is.. or In.. to Y#, Amt to A# which fits the ModelMaker magic datatype setting.
A movie to show how fast this whole idea works. Even the movie is too short.



ImportModel.png
ImportModel.png (45.36 KiB) Viewed 36931 times
All you have to do is define your model name in the Model Maker, or in the pop up Process dialog. If you leave the Name blank it will use the Model Maker's Name value. The Header Name value will be the menu it will attach this new model to. The other rules in the earlier Model Maker applies.
You can also use this to enter into core data table. Just design your Excel to have the same header values. You need not put in AD_Client, Org data as it will set according to where you login as. When using standard IDs such as C_BPartner_ID, place lookup names (must be pre-existing) such as 'Joe Block' as described above.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Wed Nov 16, 2016 10:54 am

red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Thu Nov 17, 2016 3:50 pm

Now, this gives an even more brilliant but home-coming idea. The appending of data could mean module data be they setup or sample data. This will then make the module truly complete able to give a one-time delivery of both metadata and sample setup data! (Custom code could be already made in the blank plugin provided.)
What i will do next is to allow the GenerateModule at the Header level to check each ModelMaker attachment for such csv files. The user can thus design the module complete with form or sample data in those csvs. Wowwow! Finally a real installer. This can really be the alternative to 2Pack. As you know 2Pack has its shortcomings, been brittle at times. The Module Designer csvs are more readable, handwritten but domain specific, and freshly brewed.
My code is also relatively lighter and i trust its easier to read. The string-split and csv reading is quite a breeze-thru. At least it is something that i understand and able to teach others. 2Pack pipo XMl handling packages are too daunting and complex.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Sun Nov 20, 2016 8:34 am

red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Sun Nov 27, 2016 8:11 pm

Attachments
T_SelectionProcess.png
T_SelectionProcess.png (76.38 KiB) Viewed 36612 times
InfoProcess.png
InfoProcess.png (59.75 KiB) Viewed 36638 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Tue Nov 29, 2016 2:34 pm

Made a movie to show translation on the fly.

red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Thu Dec 01, 2016 1:44 pm

Now Ninja can get the document integrated into the standard Workflow regime. Just check the WorkflowStructure box.

WorkflowStructure.png
WorkflowStructure.png (44.14 KiB) Viewed 36526 times
After GenerateModule, you will find 3 new columns created - DocAction, DocStatus and Processed. And a bunch of Workflow nodes attached to the Process linked to the DocAction. Haven't tested yet until create the DocAction part during GenerateModelFactory under CodeMaker. Then I will finish the KanbanBoard generation too.

DocActionColumn.png
DocActionColumn.png (121.3 KiB) Viewed 36526 times
WorkflowDocumentProcess.png
WorkflowDocumentProcess.png (145.05 KiB) Viewed 36526 times

I adapted with ready-made code from Nicolas Micoud with much thanks.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Sat Dec 03, 2016 4:23 pm

Done a movie to show how it works. Just a single check-box and off it goes to create a complete DocAction from a template, all on the fly.


I left out the client testing part so here are two screens to show it works but it hits an error at the end.

ProcessButtonAppears.png
ProcessButtonAppears.png (57.86 KiB) Viewed 36464 times

DialogBoxComplete.png
DialogBoxComplete.png (20.82 KiB) Viewed 36464 times
Seems like a DocStatus was null error. Shouldn't be a problem to figure it out.

DocStatusError.png
DocStatusError.png (91.96 KiB) Viewed 36464 times
[Mystery solved. It is just that you need to return true at the CompleteIt/ProcessIt methods. Its left there for you to implement something. So hitting that MWFActivity worker error is prove that the code is in and works.
After completion and attempt to process again gives the following with Processed and Status updated:

ProcessedDocument.png
ProcessedDocument.png (34.69 KiB) Viewed 36443 times
After checking with the underlying source code of the ZK panel and DocumentEngine (which i dislike to see so much hardcoding going on in the engine) it is consistent and working.

Next I will check out the structure of this document to appear on the Kanban Board and make Ninja generate that too. The end result is with one button, all this appears on the Kanban Board and the user can drag from status draft to complete or void easily. No more handling of underlying AD building or user clicking around documents. The developer just have to implement specific processing code inside the model java class. But even without doing a single line, the status setting is already handled by the Workflow Activity engine. It is that magical (gimme a day or so more).
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Tue Dec 06, 2016 7:21 am

Here is more on how the Document Workflow works. If you default the Document Status to other types you can get it to think better. For example below i set the status to 'Not Approved'. During processing it gives only the Prepare or Void action.

NotApprovedStatus.png
NotApprovedStatus.png (29.35 KiB) Viewed 36422 times
InProgress.png
InProgress.png (16.42 KiB) Viewed 36422 times
After preparing it notice the status has changed to In Progress. Now that is something refreshing because we are going places. And then that can be processed into completion.

CompletingInProgress.png
CompletingInProgress.png (33.26 KiB) Viewed 36422 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Fri Dec 09, 2016 11:58 am

Kanban Board on the fly is now done! Fetch the latest binary in my . Source is at the . Install plugin first before the Ninja. (This is updated to run on iDempiere 4.1) (Also note that the DocAction code is generated in your location (org.red1.blank) which you also need to export from your IDE and deploy onto your iDempiere instance before you can drag the cards around).

1. Login as System Admin, open RED1 NINJA, Module Creator go to the ModelMaker tab to define your model, check the Workflow Structure and not the Kanban Board yet.
2. At the CodeMaker tab, give the same model name, and check the Generate Model and its Factory classes. Provide location to store the code into your org.red1.blank plugin.
3. Go to the Header top panel bar to pull down and press the Process gearwheel icon, GenerateModule
4. When no error, return and activate back the ModelMaker model and check the Kanban Board box.
5. Run GenerateModule again.
6. Relogin to your ClientAdmin. (If you have more than one 'GW' client, make the others non active so that Kanban board will install your data model onto your preferred 'GW' client. Don't do anything to System client).

When the ModelHeader gives a greyed out of the processed records, it means you are in luck! Go straight into Main Menu to look for Kanban Board and select your process. Drag your cards around to intended process. You must be really happy. I also made a movie to show how to go through the steps above.


Kanban board action of dragging the cards around will effect the process actions of the earlier window. Thanks to Diego Ruiz son of Carlos Ruiz.

NOTE: If you want to generate Kanban Board for present core models such as Sales Orders, just define ModelMaker tab as new with the name C_Order, check the Kanban Board box, and GenerateModule. You need not generate again its model code.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Fri Dec 16, 2016 5:32 pm

Attachments
InfoReportSales.png
InfoReportSales.png (452.05 KiB) Viewed 36080 times
GenerateSalesReport.png
GenerateSalesReport.png (83.22 KiB) Viewed 36159 times
InfoWindowReport.png
InfoWindowReport.png (58.79 KiB) Viewed 36161 times
CodeMakerReport.png
CodeMakerReport.png (35.76 KiB) Viewed 36161 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Sun Dec 18, 2016 6:21 pm

Completely merged the Kanban Board into the Ninja plugin, its jar, forms and 2Packs. Made a movie to give technical insight into how that is done. And added a bit more tips on configuring the Kanban Board.

red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Thu Feb 09, 2017 6:36 pm

The plugin has been tested with changes to allow also direct import of legacy master data such as M_Product, C_BPartner, M_PriceListVersion. Follow this movie closely on how it can be done really easy and quick. It can be a good alternative to the Import Loader. You just login to your preferred Client account and attach the data files from there.



Remember to attach dependency data first. For example if your M_Product has new Category, then put them in M_Product_Category csv and run them first.

If you wish to expand your dataset, just remove the old Columnset, so they can be restated again. Now with an extended dataset, where it is the same Value, the tables can be updated. Just ensure your Value value remains the same, and at the COMMENT/HELP field of the ModelMaker, put in the word 'UPDATE'.

I am thinking of preparing a master Excel book to link all master data according to the Application Dictionary, spread as sheets. In that way any new user can just populate such an Excel book, using reference links to show a flat viewer to see all their data on a single window. Then with a dedicated programmed macro send its data into the IDempiere ERP database.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Fri Feb 10, 2017 9:46 am

Attachments
UpdatedMigration.png
UpdatedMigration.png (41.8 KiB) Viewed 35219 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Fri Mar 10, 2017 10:39 am

Got 2 new improvements to post here.
1. When new product categories are imported, they need their accounting defaults, and i have made a Products Account process for that to be done in a jiffy. You can collect it here: http://sourceforge.net/projects/red1/fi ... leCreator/
2. CSV attaching can now be done in a single zipped file without any further writing of its respective TableNames. Those will be derived from the file names i.e. 1_M_Product_Category.csv. The plugin will extract a substring (3,-4) to get 'M_Product_Category'. Therefore you have to name your files accurately. And i am uploading the zipped file for you here - http://sourceforge.net/projects/red1/fi ... p/download.

Here is a movie showing how it works like magic:

red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Next

Return to iDempiere

Who is online

Users browsing this forum: No registered users and 2 guests

cron