send::
msg ctx.set (x)
expect:: (x is undefined
)
// // .
// // x df.api.create (actionRef, deviceQuery, dailyWindow)
// // x => ems.bulk.start (wfRef=actionRef)
// // //=============== TODO
// // // $mock a.b
// // // => diesel.map(payload=[1,2])
// // // |=> ctx.echo(p=payload)
// // // => ctx.echo(m="done")
// // // $send a.b
// // // => diesel.map(payload=devices)
// // // |=> dctx.echo(xpayload=new BulkItem {
// // // deviceActionRef:wfHeader.deviceActionRef,
// // // deviceRef:payload,
// // // state:"created.initial"
// // // })
$when a.b.c => $if (countGroup >= group.groupLimit and d yy 5) (groupCont=false)
=> $if (countGroup >= group.groupLimit or wfHeader.doneItems >= wfHeader.totalItems) (groupCont=false)
== not working but is does, for bools in this case?
send::
msg ctx.set (deleteArray :Array)
=> (deletes = deleteArray filter (x => x.isDelete == true)) => (deletes = deleteArray filter (x => x.isDelete is true))
these are not working:
send::
msg diesel.realm.set (DEV_MODE:Boolean)
send::
msg bulk.init.actions2
0 $mock::
bulk.init.actions2
. (notInit
=false
)
=> $if (false == notInit) a.b8
=> $if (true == dieselRealm.DEV_MODE) a.b9
=> $if (notInit) a.b0
=> $if (notInit or dieselRealm.DEV_MODE == true) c.d1
=> $if (notInit == true or dieselRealm.DEV_MODE) c.d2
these work:
// => $if (dieselRealm.DEV_MODE) a.b6 // => $if (notInit == false) a.b7 // => $if (not notInit) a.b7a //=============== TODO // $mock a.b // => diesel.map(payload=[1,2]) // |=> ctx.echo(p=payload) // => ctx.echo(m="done") // $send a.b // => diesel.map(payload=devices) // |=> dctx.echo(xpayload=new BulkItem { // deviceActionRef:wfHeader.deviceActionRef, // deviceRef:payload, // state:"created.initial" // })
ALSO subobjects is not working:ex
// => (startEnd = wfHeader.startEnd) // => (startEnd.actualStartDtm ="sdf" ) WORKS // => (wfHeader.startEnd.actualStartDtm ="123") NOT WORK
===================
OR parsing, precendence
// $ a.a(wfHeader={totalItems:1, doneItems:1}, countDone = 1) // $expect (wfDone is true)
this not work as expected
0 $mock::
a.a (wfHeader)
$ifc:: ((1 == 1) or (1 <= 2)) . (wfDone
=true
)
$else:: . (wfDone
=false
)
ctx.export (toExport="wfDone"
="wfDone")
===============
val x1:Number=3
=3
val x2="3"
="3"
val x4=(x2 as Number)
val x5:Array=["4"]
=["4"]
val x5a=x5[="0"=0]
send::
msg ctx.set (a)
//$expect (x.x4 is Number)
// $expect ("${x.x5}" is Number)
Reset the red markers
0 $mock::
test.diesel.block99a
. (res99
=1
)
diesel.try
diesel.throw (exception="SQL"
="SQL")
. (x
=(4 / 0)
)
test.diesel.throw
diesel.catch
$ifc:: (( (exception as string) ) contains "SQL") . (res99
=2
)
there is an issue with using ctx.sleep in sync flows (i.e. [1 .. 3] map x => ctx.sleep(duration=x))
sleep won't wake up because of the recursive sync exec.
You need to log in to post a comment!