% % process the xact directory % % read the basic incoming info % _Xact !Xact.Ref % check for ability to process % "phase.txt" ofxact "phaseda" log)( exists "phasedb" log)( { *xactninf % % the A machine checks for what can be flagged for other % builders % _Camera.Phase "phasexaz" log)( any? { < |Make true |Building false |Temed false |Products true |Proding false |Prebuilt true |PresDone false |Presing false |PrdDone true |ProdFill true |ProdFilling false > not { % % if it is not for other builders, we take care of it % "xact" *atoptick false } if } { false } ifelse } { false } ifelse "xazc" log)( % % stack: can-build % { % % hand task over to vms % "present_" textwild empty ofxone "rdyofx" log)( empty { nextfile ? "preslock" log)( dup "present" "problem" replall ^3 exists second "present" "problen" replall ^4 exists or { false } { % % this vm is marked present % check for a ready marker waiting % "ready_" textwild empty ofxone "rdyofx" log)( empty { nextfile ? "presxact" log)( dup noext "_" 1 1 1 parse "readylock" log)( % % check if already busy with another task % "busy_" &2 text ofxone exists "busylock" log)( { % % this builder is still marked as busy % false } { true !allow "assign_?????_" &_Xact text !wilder empty ofxone empty { nextfile ? "alreadyassign" log)( false !allow true ? } loop filing) "ready_" textwild _allow { % % builder can be assigned this xact % _Xact &" !Build.Xact" catcr "busy_" &3 text ofxone "xonelock" log)( write /* _Xact &" !Build.Xact" catcr "monitor_" &3 text ofxone "xonelock" log)( write */ _Xact &" !Build.Xact" catcr "assign_" &3 &"_" &_Xact text ofxone "assignlock" log)( write % % copy the original phase.txt to vms state % "phase.txt" ofxact "phase_" &3 text ofxact copyfile "incoming.txt" ofxact "incoming_" &3 text ofxact copyfile "phase.txt" ofxact ".mov" overext "phase.txt" ofxact exists "stillex" log)( pop } if true } ifelse pop2nd } ifelse ? } loop filing) "assigner" log# "present_" textwild } loop filing) } { % % task is for A machine % } ifelse "<<<" log#