go to post Eduard Lebedyuk · Sep 14, 2019 I've been thinking about it but I think there are more letter characters. Unicode is a big place.
go to post Eduard Lebedyuk · Sep 13, 2019 InitGlobals process Avg. Duration would be the time between [2] and [16]. So all other processes are "included" in that time.
go to post Eduard Lebedyuk · Sep 12, 2019 Pool Size setting is shown on Production Configuration page.i think you have several process jobs.Finally, can you show Visual Trace with the first process?
go to post Eduard Lebedyuk · Sep 11, 2019 Interesting. for i=1,5,7,31,32,33,34,35,36,37,40,41,42,43,44,45,46,51,52,53,54 write $j(i,2)," ",$C(27)_"["_i_"m"_"Hello"_$C(27)_"[0m",!
go to post Eduard Lebedyuk · Sep 11, 2019 Probably not the answer you're searching for but here's an idea: set i = 0 set text = "Hello World!" set fill = $justify("", $length(text)) for { set i = i+1 write $char(13) _ $case(i#2, 1:text, 0:fill) hang 1 }
go to post Eduard Lebedyuk · Sep 9, 2019 Thank you. That's it.I wanted to move calculation into $PIECE which was the root of my troubles.Interestingly, when I pass empty path value ("") it is recognized as NULL on SQL side and CASE :path WHEN NULL does not work (never gets hit probably because it compares using equals and not is). So it's either: SELECT DISTINCT CASE nvl(:path,'') WHEN '' THEN $PIECE(Name, '.') ELSE $PIECE(Name, '.', 1, $LENGTH(:path, '.') + 1) END Name FROM %Dictionary.ClassDefinitionQuery_SubclassOf('Ens.BusinessProcessBPL') WHERE Name %STARTSWITH :path or: SELECT DISTINCT CASE WHEN :path IS NULL THEN $PIECE(Name, '.') ELSE $PIECE(Name, '.', 1, $LENGTH(:path, '.') + 1) END Name FROM %Dictionary.ClassDefinitionQuery_SubclassOf('Ens.BusinessProcessBPL') WHERE Name %STARTSWITH :path It raises the question of how to pass empty string to SQL and avoid it being recognized as NULL, but it's irrelevant for my original inquiry.
go to post Eduard Lebedyuk · Sep 6, 2019 Note that you need to 3) Register Monitor System Classes before enabling them.
go to post Eduard Lebedyuk · Sep 6, 2019 Great article.Can Native API call ObjectScript class methods?
go to post Eduard Lebedyuk · Sep 5, 2019 From docs:Procedure blocks enforce variable scoping: methods cannot see variables defined by their caller. New applications use procedure blocks; non-procedure blocks exist for backwards compatibility.
go to post Eduard Lebedyuk · Sep 5, 2019 Does your class (base class) or method has these modifiers:ProcedureBlockPublicList?
go to post Eduard Lebedyuk · Sep 5, 2019 I need to run my code one per job start, that's why OnInit does not help.OnProductionStart is closer, however it runs in a parent job and not in the Business Process job itself.Still, thank you for a very throughout explanation.
go to post Eduard Lebedyuk · Sep 5, 2019 For me the main acceptable case of foreach iteration is business objects - for example we receive array of results and must process them. In that case we, of course, must iterate over them, no way around it.Everything static: constraints, enums, dictionaries, etc... should be (and usually could be) used without foreach iteration.
go to post Eduard Lebedyuk · Sep 5, 2019 I agree that there are cases where we need to do something over each element of the collection.But you said:constants, static arrays in algorithms, e.g. arbitrary dictionariesWhich implies that foreach iteration is not desired here.Anyways, in that case what does matter is size.If you're sure that it would be less than $$$MaxStringLength then you can use $lb, otherwise use locals (which can be converted to ppg/globals easily).
go to post Eduard Lebedyuk · Sep 4, 2019 In EntityBrowser.API class set PAGESIZE parameter to 100 and compile the class.
go to post Eduard Lebedyuk · Sep 4, 2019 1. Before we iterate over rows we need to determine column type, the example is about that.Here's an example of what I'm talking about.2. You want to avoid full scan as much as possible. Two techniques for that are:knowing positionknowing keyAnd that determines the type of structure used.If you don't know either you need to think about possible algorithm improvements.