Intellij not recognising xml for bpmn - intellij-idea

This just started to happen out of no where. I have an existing Activiti project. I have the Activiti BPMN Visualizer plugin installed. Now in every one of my .bpmn20.xml files, Idea is saying "element x must be declared" or "cannot resolve symbol" Here is an example:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://www.activiti.org/processdef">
<process id="test" name="test" isExecutable="true">
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_test">
<bpmndi:BPMNPlane bpmnElement="test" id="BPMNPlane_test">
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
the tags for definitions and process are showing red, with errors in the problems tab. The namespaced tags, bpmndi:BPMNDiagram for example, are fine. What has happened and how do I fix it?

If it happens out of nowhere try to invalidate the cache and restart the ide.

Related

IntelliJ IDEA Plugin for BPMN designer

I've found this post about BPMN files designer, I tried to open designer window in every way, but i can only open diagram preview. Did anyone use jBPM plugin and can tell me how can I open designer window?
Edit
For simplicity, i'm using this bpmn file:
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
targetNamespace="http://www.activiti.org/bpmn2.0">
<process id="helloWorld">
<startEvent id="start" />
<sequenceFlow id="flow1" sourceRef="start" targetRef="script" />
<scriptTask id="script" name="HelloWorld" scriptFormat="groovy">
<script>
System.out.println("Hello world")
</script>
</scriptTask>
<sequenceFlow id="flow2" sourceRef="script" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
</definitions>
It's from tutorial
You don't need any third-party plug-ins, the bundled plug-in works just fine. We've recorded a screencast which shows how to use it:
jBPM plugin: how to
Make sure you have at least 2016.3.x IntelliJ IDEA Ultimate version.

How do I fix the Spring XML validation in IntelliJ

I am getting a "false positive" error in a Spring XML file....
Expected behavior: The inbound channel adapter element with header-mapper of DefaultAmqpHeaderMapper validates properly in IntelliJ
Actual behavior: IntelliJ reports that the header-mapper is not of type HeaderMapper
There was an issue that was fixed in 3.0 but it seems like my IntelliJ is validating the below applicationContext.xml against an old version of the amqp schema. How do I refresh it?
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:int-amqp="http://www.springframework.org/schema/integration/amqp"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rabbit="http://www.springframework.org/schema/rabbit"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration/amqp http://www.springframework.org/schema/integration/amqp/spring-integration-amqp-4.2.xsd http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit.xsd">
<int-amqp:inbound-channel-adapter
channel="ch1" queue-names="queue"
connection-factory="amqpConnectionFactory" error-channel="errorChannel"
header-mapper="allHeadersMapper" concurrent-consumers="1" />
Edit: Was found in 14.1.5. Upgraded to 2016.3.4 on Linux and reproduced.
Reproduced with simple code at https://github.com/dcw312/intellij-validation-error. IntelliJ issue created: https://youtrack.jetbrains.com/issue/IDEA-167842

Why am I getting, "Error 392 Error occurred in deployment step 'Activate Features': Operation is not valid due to the current state of the object."

Does a missing "Module" section in the Elements.xml file cause "Error 392 Error occurred in deployment step 'Activate Features': Operation is not valid due to the current state of the object."?
All of a sudden, I get that error when trying to rebuild a Sharepoint Web Part. One thing I researched indicates that perhaps Elements.xml has a problem. I haven't changed anythying in this in a long while, nor have I changed anything explicitly, I don't think, but here it is as it now stands:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Receivers ListTemplateId="104">
<Receiver>
<Name>PostTravelItemEventReceiverItemAdded</Name>
<Type>ItemAdded</Type>
<Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
<Class>PostTravelWizard.PostTravelItemEventReceiver.PostTravelItemEventReceiver</Class>
<SequenceNumber>10000</SequenceNumber>
</Receiver>
<Receiver>
<Name>PostTravelItemEventReceiverContextEvent</Name>
<Type>ContextEvent</Type>
<Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
<Class>PostTravelWizard.PostTravelItemEventReceiver.PostTravelItemEventReceiver</Class>
<SequenceNumber>10000</SequenceNumber>
</Receiver>
</Receivers>
</Elements>
So all it has right now is a reference to the two "Event Receiver" handlers I added; I compared this non-working project's Elements.xml file with other Elements.xml files I have (from Web Parts that do work); one of them looks like this:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/" >
<Module Name="TravelFormHelpWebPart" List="113" Url="_catalogs/wp">
<File Path="TravelFormHelpWebPart\TravelFormHelpWebPart.webpart" Url="TravelFormHelpWebPart.webpart" Type="GhostableInLibrary" >
<Property Name="Group" Value="Financial Affairs Forms" />
</File>
</Module>
</Elements>
...and the other one is very similar, like so:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/" >
<Module Name="DPSVisualWebPart" List="113" Url="_catalogs/wp">
<File Path="DPSVisualWebPart\DPSVisualWebPart.webpart" Url="DPSVisualWebPart.webpart" Type="GhostableInLibrary" >
<Property Name="Group" Value="Financial Affairs Forms" />
</File>
</Module>
</Elements>
The difference seems to be that the working Web Apps have a "Module" section in their Elements.xml file
There was one other clue, too, from the link above, to wit:
If step 2 didn't resolve your error, check if your deployment target is set to "WebApplication". It needs to be set to "Global AssemblyCache" instead.
...and here, too, somehow, this non-working WebPart was set to "WebApplication," whereas the others are set to "GAC"). Changing that didn't help, though - I still get the same err msg as reported above.
So if the missing "Module" section is the problem, that was apparently there earlier (when it was working) and somehow got 86'd (along with the changing of the project's "Assembly Deployment Target" property, apparently). Why would/how could that happen?
Adding (back, apparently) the Module section did the trick.
Specifically, I added the following above the "Receivers" section:
<Module Name="PostTravelWizardWebPart" List="113" Url="_catalogs/wp">
<File Path="PostTravelWizardWebPart\PostTravelWizardWebPart.webpart" Url="PostTravelWizardWebPart.webpart" Type="GhostableInLibrary" >
<Property Name="Group" Value="Financial Affairs Forms" />
</File>
</Module>
...and it now deploys successfully.
(Note that I also changed (again, back, apparently) the value of the project's "Assembly Deployment Target" property to "GlobalAssemblyCache" from "WebApplication"

How to add xml file during installation using wix

I want to create the following xml during the installation created by wix 3.9.
<?xml version="1.0" encoding="utf-8"?>
<MappedUsers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UsersList>
<LyncUserID>
<CustomUserName>John.Smith</UcaUserName>
</LyncUcaUserID>
</UsersList>
</MappedUsers>
Tried creating the file using following code but got the error message during installtion that file doesn't exists.
<?define UserNameFile="[AppDataFolder]ThirdParty\LyncUcaUserMapping.XML" ?>
<util:XmlFile Id="UserMapping" Value="[USER_NAME]" ElementPath="/UsersList/LyncUserID/add[\[]#key='UcaUserName'[\]]" Action="setValue" File="$(var.UserNameFile)" Name="value" Sequence="7" />
Since I could not create the file during the installation I created the file manually and placed in my appdata folder. But then above code didn't work either as it says "failed to find the following node".
What am I missing?
Best method to do this is first you copy a sample xml file as below.
<?xml version="1.0" encoding="utf-8"?>
<MappedUsers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
</MappedUsers>
Then edit it using a custom action.
Here is a link which shows how to edit xml files using c#
http://support.microsoft.com/kb/301233
Following link shows how to add custom actions to a wix project.
http://wixtoolset.org/documentation/manual/v3/wixdev/extensions/authoring_custom_actions.html

Windows 8 App Manifest: Image Assets Error

These images default VS images.But it doesn't work.
Error 4 Payload file
'C:\Users\Mert\documents\visual studio 2012\Projects\Y\P\Assets\StoreLogo.scale-100.png' does not exist.
Error 3 Payload file
'C:\Users\Mert\documents\visual studio 2012\Projects\Y\P\Assets\SplashScreen.scale-100.png' does not exist.
Error 2 Payload file
'C:\Users\Mert\documents\visual studio 2012\Projects\Y\P\Assets\SmallLogo.targetsize-32.png' does not exist.
Error 1 Payload file
'C:\Users\Mert\documents\visual studio 2012\Projects\Y\P\Assets\SmallLogo.scale-100.png' does not exist.
I know question is incomprehensible but I don't find different way to explain.
Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
<Identity Name="" Publisher="CN=Mert" Version="1.0.0.0" />
<Properties>
<DisplayName>Y</DisplayName>
<PublisherDisplayName>Mert</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Prerequisites>
<OSMinVersion>6.2.1</OSMinVersion>
<OSMaxVersionTested>6.2.1</OSMaxVersionTested>
</Prerequisites>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="Y.App">
<VisualElements DisplayName="Y" Logo="Assets\Logo.png" SmallLogo="Assets\SmallLogo.png" Description="Y" ForegroundText="light" BackgroundColor="#464646">
<DefaultTile ShowName="allLogos" />
<SplashScreen Image="Assets\SplashScreen.png" />
</VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
I also had this problem last day. I noticed that when I deleted an image from assert, it wont delete its occurrence from the Solution explorer in Visual Studio. Delete those files from solution explorer fixed the issue.
Cheers...!
I just encountered this myself.
It seems Visual Studio can't handle a trial-and-error approach for logos.
I got rid of it by manually editing the .csproj file and removing the missing assets from there.
There is a workaround by setting the Generate App Bundle setting to Never.