Skip to content

Instantly share code, notes, and snippets.

Avatar

Luiz João Motta ljmotta

  • Software Engineer - Red Hat
  • Campinas, SP - Brazil
View GitHub Profile
@ljmotta
ljmotta / TraficViolation.dmn
Last active Jul 5, 2021
TraficViolation.dmn
View TraficViolation.dmn
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_41B2F498-3F8D-4DBA-95B9-216E1C0209EA" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="_4195FEF6-9C31-4A5D-97EC-AFF8B8B57E38" name="new-file" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_41B2F498-3F8D-4DBA-95B9-216E1C0209EA">
<dmn:extensionElements/>
<dmn:itemDefinition id="_7FBA70D7-5A2A-4583-947F-71D4C6BD98C9" name="tDriver" isCollection="false">
<dmn:itemComponent id="_5E62C98F-9C03-49D3-909A-F87397910191" name="Points" isCollection="false">
<dmn:typeRef>number</dmn:typeRef>
</dmn:itemComponent>
<dmn:itemComponent id="_34FF7299-DF1E-4FCC-87A7-ADD428028D59" name="Age" isCollection="false">
<dmn:typeRef>number</d
@ljmotta
ljmotta / package.json
Last active Jun 28, 2021
Uniforms version 3.0.0 bug using `autoField` props
View package.json
{
"name": "newapp",
"version": "0.1.0",
"private": true,
"dependencies": {
"@rjsf/core": "^2.4.1",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"ajv": "^7.0.3",
View sample.dmn
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_857FE424-BEDA-4772-AB8E-2F4CDDB864AB" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" id="_C6CBECEB-2BBC-4E14-80B0-17F576B2CF92" name="loan_pre_qualification" expressionLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_857FE424-BEDA-4772-AB8E-2F4CDDB864AB">
<dmn:extensionElements/>
<dmn:itemDefinition id="_D40B0106-62E8-4AC0-A39A-C6C9506194A9" name="Requested_Product" isCollection="false">
<dmn:itemComponent id="_68b4a96c-198a-4575-b29a-a2c8b0539a2c" name="Type" isCollection="false">
<dmn:typeRef>Product_Type</dmn:typeRef>
</dmn:itemComponent>
<dmn:itemComponent id="_ab1647c
@ljmotta
ljmotta / new-file.bpmn
Last active Apr 7, 2021
new-file.bpmn
View new-file.bpmn
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpsim="http://www.bpsim.org/schemas/1.0" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" xmlns:xsi="xsi" id="_uDNr8Xn6EDmf4I4kwuolfQ" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd http://www.omg.org/spec/DD/20100524/DC DC.xsd http://www.omg.org/spec/DD/20100524/DI DI.xsd " exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20">
<bpmn2:process id="new_file" drools:packageName="com.example" drools:version="1.0" drools:adHoc="false" name="new-file" isExecutable="true" processType="Public">
<bpmn2:sequenceFlow id="_C69F4924-10DF-44B9-A33B-4FC6183F4176" sourceRef="_6B2D3101-B56F-4B42-89C4-E9B3F2683247" targetRef="_205362F4-16F2
View sample2.dmn
<?xml version="1.0" encoding="UTF-8"?>
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" id="_C6CBECEB-2BBC-4E14-80B0-17F576B2CF92" name="loan_pre_qualification" expressionLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_857FE424-BEDA-4772-AB8E-2F4CDDB864AB"><dmn:extensionElements/><dmn:itemDefinition id="_D40B0106-62E8-4AC0-A39A-C6C9506194A9" name="Requested_Product" isCollection="false"><dmn:itemComponent id="_68b4a96c-198a-4575-b29a-a2c8b0539a2c" name="Type" isCollection="false"><dmn:typeRef>Product_Type</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_ab1647c2-cb63-4808-8d90-36d41591a40c" name="Rate" isCollection="false"><dmn:typeRef>number</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_152917bb-6095-4057-8613-5b08b77db235" name="Term" isCollection="false"><dmn:typeRef>number</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_e2f0e8cd-8f5a-43d4-b263-aaa5b9ae442
View callbackRef.ts
export function useEmbeddedRef() {
const [embedded, setEmbedded] = useState<EmbeddedRef | undefined>(null);
const embeddedRef = useCallback((node: EmbeddedRef) => {
if (node !== null) {
setEmbedded(node);
}
}, []);
return { embedded, embeddedRef };
}
@ljmotta
ljmotta / sample.dmn
Last active Mar 10, 2021
sample.dmn
View sample.dmn
<?xml version="1.0" encoding="UTF-8"?>
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" id="_C6CBECEB-2BBC-4E14-80B0-17F576B2CF92" name="loan_pre_qualification" expressionLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_857FE424-BEDA-4772-AB8E-2F4CDDB864AB"><dmn:extensionElements/><dmn:itemDefinition id="_D40B0106-62E8-4AC0-A39A-C6C9506194A9" name="Requested_Product" isCollection="false"><dmn:itemComponent id="_68b4a96c-198a-4575-b29a-a2c8b0539a2c" name="Type" isCollection="false"><dmn:typeRef>Product_Type</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_ab1647c2-cb63-4808-8d90-36d41591a40c" name="Rate" isCollection="false"><dmn:typeRef>number</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_152917bb-6095-4057-8613-5b08b77db235" name="Term" isCollection="false"><dmn:typeRef>number</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_e2f0e8cd-8f5a-43d4-b263-aaa5b9ae442
@ljmotta
ljmotta / new-file.bpmn
Last active Feb 9, 2021
new-file.bpmn
View new-file.bpmn
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpsim="http://www.bpsim.org/schemas/1.0" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" id="_EV7oUE0SEDmbCcb1ViFUeg" exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20">
<bpmn2:process id="new-file" drools:packageName="com.example" drools:version="1.0" drools:adHoc="false" name="new-file" isExecutable="true" processType="Public">
<bpmn2:sequenceFlow id="_C6D9921A-DB95-43CC-90F7-E5E5DB833435" sourceRef="_EEB34335-D145-425A-85B9-88380B3120B8" targetRef="_10BBAD83-5815-483B-83FC-DA4E637EDFE6">
<bpmn2:extensionElements>
<drools:metaData name="isAutoConnection.source">
<drools:metaValue><![CDATA[true]]></drools:metaValue>
</drools:metaData>
<drools:metaData name="isAutoConnection.target">
@ljmotta
ljmotta / new-file.bpmn
Last active Jan 20, 2021
new-file.bpmn
View new-file.bpmn
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpsim="http://www.bpsim.org/schemas/1.0" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" id="_723eQD2PEDm8FLK2Edk7rA" exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20">
<bpmn2:process id="new-file" drools:packageName="com.example" drools:version="1.0" drools:adHoc="false" name="new-file" isExecutable="true" processType="Public">
<bpmn2:sequenceFlow id="_1DE60E61-21D8-4D9F-937C-5C9E68266871" sourceRef="_1E5E5BFA-D1B8-4B27-A587-6039DA46B202" targetRef="_2BDF1EBE-2979-4DC0-9A9C-ABD9FA5743D1">
<bpmn2:extensionElements>
<drools:metaData name="isAutoConnection.source">
<drools:metaValue><![CDATA[true]]></drools:metaValue>
</drools:metaData>
<drools:metaData name="isAutoConnection.target">
@ljmotta
ljmotta / new-file.dmn
Last active Jan 20, 2021
new-file.dmn
View new-file.dmn
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_200ACB8D-151F-46D7-AAA1-7FB3FCDF745A" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="_E8222C11-C766-4EFA-B0BC-1B5643797D13" name="new-file" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_200ACB8D-151F-46D7-AAA1-7FB3FCDF745A">
<dmn:extensionElements/>
<dmn:inputData id="_66B3C1C2-CB29-4652-AFA6-75E959193E3A" name="InputData-1">
<dmn:extensionElements/>
<dmn:variable id="_BF32FDE0-6967-491F-9B53-74CC9E57C5E3" name="InputData-1"/>
</dmn:inputData>
<dmn:decision id="_4728AB52-B966-450A-831C-2EE54C9DF04C" name="Decision-1">
<dmn:extensionElements/>
<dmn:variable id="_B7A518D8-1936-403E-B823-1AF70BCCDA5C" name="Decision-1"/